New submission from John Firestone: Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def outer(): ... def inner(arg): ... len(arg) ... exec('', {}) ... File "<stdin>", line 4 SyntaxError: unqualified exec is not allowed in function 'outer' it contains a nested function with free variables >>> >>> def outer(): ... def inner(arg): ... len(arg) ... exec '' in {} ... >>>
---------- components: Interpreter Core files: bug.py messages: 233096 nosy: johnf priority: normal severity: normal status: open title: Compiler doesn't recognize qualified exec('', {}) type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file37541/bug.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23113> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com