[issue5044] name not found in generator in eval()
Frank Henigman
report at bugs.python.org
Sat Jan 24 19:49:07 CET 2009
New submission from Frank Henigman <fjhenigman at cgl.uwaterloo.ca>:
# works
>>> eval( "sum( [ a[0]=='a' for j in 'a' ] )", {}, dict(a='a'))
# take out the square brackets
>>> eval( "sum( a[0]=='a' for j in 'a' )", {}, dict(a='a'))
NameError: global name 'a' is not defined
----------
components: Interpreter Core
messages: 80469
nosy: fjhpy
severity: normal
status: open
title: name not found in generator in eval()
type: behavior
versions: Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5044>
_______________________________________
More information about the Python-bugs-list
mailing list