You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Merge pull request #451 from andrem-eberle/master
Tentative fix for #439
This commit is contained in:
Binary file not shown.
@@ -725,3 +725,10 @@ values = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assert sorted(values.values())[1:] == list(range(2, 34))
|
assert sorted(values.values())[1:] == list(range(2, 34))
|
||||||
|
|
||||||
|
|
||||||
|
# Check that we can distinguish names from strings in literal collections, e.g. lists.
|
||||||
|
# The list has to have more than 4 items to get accumulated in a collection
|
||||||
|
a = ["y", 'Exception', "x", Exception, "z"]
|
||||||
|
assert a[1] == "Exception"
|
||||||
|
assert a[3] == Exception
|
||||||
|
@@ -171,11 +171,11 @@ class Scanner(object):
|
|||||||
has_extended_arg=False,
|
has_extended_arg=False,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if tokens[j] == "LOAD_CONST":
|
|
||||||
opname = "ADD_VALUE"
|
|
||||||
else:
|
|
||||||
opname = "ADD_VALUE_VAR"
|
|
||||||
for j in range(collection_start, i):
|
for j in range(collection_start, i):
|
||||||
|
if tokens[j] == "LOAD_CONST":
|
||||||
|
opname = "ADD_VALUE"
|
||||||
|
else:
|
||||||
|
opname = "ADD_VALUE_VAR"
|
||||||
new_tokens.append(
|
new_tokens.append(
|
||||||
Token(
|
Token(
|
||||||
opname=opname,
|
opname=opname,
|
||||||
|
Reference in New Issue
Block a user