You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
Port over some recent decompyle3 3.8 fixes
This commit is contained in:
@@ -14,6 +14,12 @@ assert (
|
||||
assert "def0" == f"{abc}0"
|
||||
assert "defdef" == f"{abc}{abc!s}"
|
||||
|
||||
# From 3.8 test/test_string.py
|
||||
# We had the precedence of yield vs. lambda incorrect.
|
||||
def fn(x):
|
||||
yield f"x:{yield (lambda i: x * i)}"
|
||||
|
||||
|
||||
# From 3.6 functools.py
|
||||
# Bug was handling format operator strings.
|
||||
|
||||
|
12
test/simple_source/bug38/00_bug_dict_comp.py
Normal file
12
test/simple_source/bug38/00_bug_dict_comp.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# 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}
|
Reference in New Issue
Block a user