New submission from Willard: The following code does not work like expected, it triggers a NameError.
class C: a = 42 list(a for _ in 'x') >>> NameError: global name 'a' is not defined This issue was discussed on comp.lang.python in the thread "Is this a bug, or is it me?". ---------- components: Interpreter Core messages: 60060 nosy: cptnwillard severity: minor status: open title: NameError with genexp in class scope type: behavior versions: Python 2.5 __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1863> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com