Message9619
Logged In: YES
user_id=21627
The attached script also has the example
def f(x):
a = x
def g():
print a
return eval('a')
return g
f(3)()
which currently produces
3
Traceback (most recent call last):
File "a.py", line 8, in ?
f(3)()
File "a.py", line 5, in g
return eval('a')
File "<string>", line 0, in ?
NameError: name 'a' is not defined
I believe this is a bug, since the variable a is referenced
by the program text of the block that contains the call to
eval(); thus, accessing a inside eval should work well;
Reopening. |
|
Date |
User |
Action |
Args |
2007-08-23 13:59:40 | admin | link | issue528274 messages |
2007-08-23 13:59:40 | admin | create | |
|