Georg Brandl <ge...@python.org> added the comment:

There is no way for the interpreter to distinguish between builtins and
"other" types of free variables.

If you need unqualified exec to work in an innner function, use function
parameters with defaults, like this:

def a():
    def b(long=long):
        x = long(3)
        exec ""

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

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4220>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to