lambda in list comprehension acting funny

Chris Angelico rosuav at gmail.com
Fri Jul 13 19:20:04 CEST 2012


On Sat, Jul 14, 2012 at 2:46 AM, rusi <rustompmody at gmail.com> wrote:
> Ok let me restate: if python were to work that way (without the
> global) we could say either
> a Python chooses to have dynamic scoping of variables
> or
> b There is a bug in python's scoping rules

Or c, there's a declaration at the top:

from __future__ import variable_declarations

Like braces, it's a MASSIVE improvement to the language, and it's part
of a huge conspiracy that it isn't there by default. But all it takes
is a little future statement and you're on Python 4000!

</troll>

ChrisA
(I shouldn't post at half past three in the morning. I get stupid... er.)



More information about the Python-list mailing list