You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
13 lines
397 B
Python
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}
|