[issue991196] An inconsistency with nested scopes

Jeremy Hylton report at bugs.python.org
Tue Mar 31 17:56:25 CEST 2009


Jeremy Hylton <jeremy at alum.mit.edu> added the comment:

This code behaves as intended.  The module-level execution environment
is different than other environments.  The global scope and local scope
are the same dictionary.  Assignments at the top-level become globals
because of this behavior of the execution environment.  If you want exec
to mimic the top-level environment, you need to pass it a single dictionary.

----------
resolution:  -> wont fix
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue991196>
_______________________________________


More information about the Python-bugs-list mailing list