You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
Bug fix for expression in 2.5/2.6
This commit is contained in:
@@ -3,3 +3,8 @@ def _lsbStrToInt(str):
|
|||||||
(ord(str[1]) << 8) + \
|
(ord(str[1]) << 8) + \
|
||||||
(ord(str[2]) << 16) + \
|
(ord(str[2]) << 16) + \
|
||||||
(ord(str[3]) << 24)
|
(ord(str[3]) << 24)
|
||||||
|
|
||||||
|
def test(x):
|
||||||
|
return x
|
||||||
|
|
||||||
|
test(a == b == c == 1)
|
@@ -51,3 +51,8 @@ def func_with_tuple_args6((a,b), (c,d)=(2,3), *args, **kwargs):
|
|||||||
|
|
||||||
def func_ret1():
|
def func_ret1():
|
||||||
return 1 < 2 < 3
|
return 1 < 2 < 3
|
||||||
|
|
||||||
|
def read(size=0):
|
||||||
|
if size > 0 and size <= x - cur:
|
||||||
|
return 0
|
||||||
|
return 0
|
@@ -777,6 +777,9 @@ class Scanner25(scan.Scanner):
|
|||||||
last_jump_good = False
|
last_jump_good = False
|
||||||
self.fixed_jumps[pos] = fix or match[-1]
|
self.fixed_jumps[pos] = fix or match[-1]
|
||||||
return
|
return
|
||||||
|
elif pos < rtarget and code[target] == ROT_TWO:
|
||||||
|
self.fixed_jumps[pos] = target
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
self.fixed_jumps[pos] = match[-1]
|
self.fixed_jumps[pos] = match[-1]
|
||||||
return
|
return
|
||||||
|
@@ -776,6 +776,9 @@ class Scanner26(scan.Scanner):
|
|||||||
last_jump_good = False
|
last_jump_good = False
|
||||||
self.fixed_jumps[pos] = fix or match[-1]
|
self.fixed_jumps[pos] = fix or match[-1]
|
||||||
return
|
return
|
||||||
|
elif pos < rtarget and code[target] == ROT_TWO:
|
||||||
|
self.fixed_jumps[pos] = target
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
self.fixed_jumps[pos] = match[-1]
|
self.fixed_jumps[pos] = match[-1]
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user