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.

classification
Title: compile and nested scopes
Type: behavior Stage:
Components: None Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, webcubator
Priority: normal Keywords:

Created on 2010-09-16 08:11 by webcubator, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tmp1.py webcubator, 2010-09-16 08:11
Messages (2)
msg116515 - (view) Author: Sergey (webcubator) Date: 2010-09-16 08:11
See attached tmp1.py
It is very simple but it doesn't work
It raises NameError
NameError: global name 'arg' is not defined
msg116578 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-09-16 17:31
If you want to execute code as in the global namespace, don't supply a separate "locals" dict to eval/exec.
History
Date User Action Args
2022-04-11 14:57:06adminsetgithub: 54079
2010-09-16 17:31:21georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg116578

resolution: not a bug
2010-09-16 08:11:19webcubatorcreate