Files
python-uncompyle6/test/simple_source/bug35/01_map_unpack.py
rocky 6b78677a74 Work on 3.5+ BUILD_MAP_UNPACK...
bugs still remain, just reduced.
2018-04-01 13:41:16 -04:00

20 lines
456 B
Python

# Python 3.5+ PEP 448 - Additional Unpacking Generalizations for dictionaries
# RUNNABLE!
b = {**{}}
assert b == {}
c = {**{'a': 1, 'b': 2}}
assert c == {'a': 1, 'b': 2}
d = {**{'x': 1}, **{'y': 2}}
assert d == {'x': 1, 'y': 2}
# {'c': 1, {'d': 2}, **{'e': 3}}
[*[]]
assert {0: 0} == {**{0:0 for a in c}}
# FIXME: assert deparsing is incorrect for:
# {**{}, **{}}
# assert {} == {**{}, **{}, **{}}
# {**{}, **{}, **{}}
# assert {} == {**{}, **{}, **{}}