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 hawkett
Recipients hawkett
Date 2010-05-25.16:49:06
SpamBayes Score 0.02264971
Marked as misclassified No
Message-id <1274806148.14.0.229053975552.issue8819@psf.upfronthosting.co.za>
In-reply-to
Content
A discussion on stack overflow - http://stackoverflow.com/questions/2904274/globals-and-locals-in-python-exec - has led to the conclusion that the variable lookup behaviour within code run using exec() is not behaving as expected. Variable lookup inside a class definition does not search the enclosing scope's locals() prior to issuing a NameError - there are full details and test cases at the above URL.
History
Date User Action Args
2010-05-25 16:49:08hawkettsetrecipients: + hawkett
2010-05-25 16:49:08hawkettsetmessageid: <1274806148.14.0.229053975552.issue8819@psf.upfronthosting.co.za>
2010-05-25 16:49:06hawkettlinkissue8819 messages
2010-05-25 16:49:06hawkettcreate