Incorrect scope of list comprehension variables
apt.shansen at gmail.invalid
Tue Apr 6 12:34:29 EDT 2010
On 2010-04-06 09:34:04 -0700, Lie Ryan said:
> in python there is only a flat
> local namespace and the names resolver becomes a thousand times simpler
> (and faster).
This hasn't been true for a long time. Yes, local variables are
optimized to be indexed in an array, but Python has nested scopes for
functions. But it does not have true lexical scoping, no.
... p.s: change the ".invalid" to ".com" in email address to reply privately.
More information about the Python-list