Message24729
I'm trying to 'exec'ing the following code:
class Foo: pass
class Bar:
f = Foo
The error appears when using 'exec f in {}, {}':
>>> f = ''.join(open('/home/stefan/t.py').readlines())
>>> exec f in {}, {}
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "<string>", line 2, in ?
File "<string>", line 3, in Bar
NameError: name 'Foo' is not defined
I tested on python 2.3 and python 2.4, both show the same
behavior. |
|
Date |
User |
Action |
Args |
2007-08-23 14:30:26 | admin | link | issue1167300 messages |
2007-08-23 14:30:26 | admin | create | |
|