[issue4447] exec inside a function
Georg Brandl
report at bugs.python.org
Thu Nov 27 18:47:21 CET 2008
Georg Brandl <georg at python.org> added the comment:
It is "valid" Python 3 and the lack of an effect on the local is correct.
>From Python 3 on, "exec" is a function and therefore lacks the special
magic properties it had in Python 2 that made it possible execute the
code "as if it just was written there".
In effect, what exec() modifies here is similar to what locals()
returns: a mere copy of the local namespace.
----------
nosy: +georg.brandl
resolution: -> wont fix
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4447>
_______________________________________
More information about the Python-bugs-list
mailing list