Python: re-initialize a function's default value for subsequent calls to the function.
- by Peter Stewart
I have a function that calls itself to increment and decrement a stack.
I need to call it a number of times, and I'd like it to work the same way in subsequent calls
but, as expected, it doesn't re-use the default value.
I've read that this is a newbie trap and I've seen suggested solutions, but I haven't been able
to make any solution work.
…