[New-bugs-announce] [issue24975] Python 3.5 can't compile AST involving PEP 448 unpacking
David Beazley
report at bugs.python.org
Tue Sep 1 03:13:16 CEST 2015
New submission from David Beazley:
The compile() function is not able to compile an AST created from code that uses some of the new unpacking generalizations in PEP 448. Example:
code = '''
a = { 'x':1, 'y':2 }
b = { **a, 'z': 3 }
'''
# Works
ccode = compile(code, '', 'exec')
# Crashes
import ast
tree = ast.parse(code)
ccode = compile(tree, '', 'exec')
# ----------------------------------
Error Traceback:
Traceback (most recent call last):
File "bug.py", line 11, in <module>
ccode = compile(tree, '', 'exec')
ValueError: None disallowed in expression list
Note: This bug makes it impossible to try generalized unpacking examples interactively in IPython.
----------
components: Library (Lib)
messages: 249442
nosy: dabeaz
priority: normal
severity: normal
status: open
title: Python 3.5 can't compile AST involving PEP 448 unpacking
type: crash
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24975>
_______________________________________
More information about the New-bugs-announce
mailing list