[issue23113] Compiler doesn't recognize qualified exec('', {})

John Firestone report at bugs.python.org
Thu Dec 25 18:05:06 CET 2014


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 <report at bugs.python.org>
<http://bugs.python.org/issue23113>
_______________________________________


More information about the Python-bugs-list mailing list