Confused about closures and scoping rules
Jean-Paul Calderone
exarkun at divmod.com
Tue Nov 6 19:23:43 EST 2007
On Tue, 06 Nov 2007 17:07:47 -0700, Fernando Perez <fperez.net at gmail.com> wrote:
> [snip]
>
>This struck me as counterintuitive, but I couldn't find anything in the
>official docs indicating what the expected behavior should be. Any
>feedback/enlightenment would be welcome. This problem appeared deep inside a
>complicated code and it took me almost two days to track down what was going
>on...
Lots of people ask about this. The behavior you observed is the expected
(by the implementors, anyway) behavior.
Jean-Paul
More information about the Python-list
mailing list