Files
python-uncompyle6/test/simple_source/bug38/00_bug_dict_comp.py
2022-06-26 04:26:15 -04:00

13 lines
397 B
Python

# Issue 104
# Python 3.8 reverses the order or keys and values in
# dictionary comprehensions from the order in all previous Pythons.
# Also we were looking in the wrong place for the collection of the
# dictionary comprehension
# RUNNABLE!
"""This program is self-checking!"""
x = [(0, [1]), (2, [3])]
for i in range(0, 1):
y = {key: val[i - 1] for (key, val) in x}
assert y == {0: 1, 2: 3}