Bizarre behavior with mutable default arguments

Ali aafshar at gmail.com
Wed Jan 2 05:56:54 EST 2008


On Dec 30 2007, 12:27 am, Steven D'Aprano <st... at REMOVE-THIS-
cybersource.com.au> wrote:

> In the absence of a better solution, I'm very comfortable with keeping
> the behaviour as is. Unfortunately, there's no good solution in Python to
> providing functions with local storage that persists across calls to the
> function:

...

(4) Instances handle this pretty well, just s/functions/methods/.



More information about the Python-list mailing list