Why doesn't eval of generator expression work with locals?

Hendrik van Rooyen mail at microcorp.co.za
Thu Jan 29 01:06:31 EST 2009


"Gabriel Genellina" <gagsl-py2 at yahoo.com.ar> wrote:



>> Seems that it is important *when* those functions are evaluated, but I
>> don't understand *why*...

Because the scope changes - see also the recent thread on exec woes
where towards the end I put in a similar example - funny, it must the 
flux or something - seems to be the season for calling id on locals()
:-)

- Hendrik





More information about the Python-list mailing list