New submission from Frank Henigman :
# 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
<http://bugs.python.org/issue5044>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com