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 <[email protected]>
<http://bugs.python.org/issue24975>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com