New submission from Frank Henigman <[email protected]>:

# 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 <[email protected]>
<http://bugs.python.org/issue5044>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to