This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dabeaz
Recipients dabeaz
Date 2015-09-01.01:13:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441069996.63.0.493747155256.issue24975@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-09-01 01:13:16dabeazsetrecipients: + dabeaz
2015-09-01 01:13:16dabeazsetmessageid: <1441069996.63.0.493747155256.issue24975@psf.upfronthosting.co.za>
2015-09-01 01:13:16dabeazlinkissue24975 messages
2015-09-01 01:13:15dabeazcreate