homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stefan
Recipients
Date 2005年03月21日.05:35:43
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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.
History
Date User Action Args
2007年08月23日 14:30:26adminlinkissue1167300 messages
2007年08月23日 14:30:26admincreate

AltStyle によって変換されたページ (->オリジナル) /