generator expression works in shell, NameError in script

ryles rylesny at gmail.com
Fri Jun 19 05:02:43 CEST 2009


> Does the generator expression have its own little namespace or so ?

Yes, generators create a new scope:

http://docs.python.org/reference/expressions.html#grammar-token-generator_expression




More information about the Python-list mailing list