[issue1863] NameError with genexp in class scope
Willard
report at bugs.python.org
Thu Jan 17 22:03:58 CET 2008
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 <report at bugs.python.org>
<http://bugs.python.org/issue1863>
__________________________________
More information about the Python-bugs-list
mailing list