You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Python 2.1 doesn't have FOR_ITER or GET_ITER...
adjust locgic for this fact
This commit is contained in:
@@ -427,7 +427,7 @@ class Scanner2(scan.Scanner):
|
||||
j = self.prev[s]
|
||||
while code[j] in self.designator_ops:
|
||||
j = self.prev[j]
|
||||
if self.version >= 2.1 and code[j] == self.opc.FOR_ITER:
|
||||
if self.version > 2.1 and code[j] == self.opc.FOR_ITER:
|
||||
stmts.remove(s)
|
||||
continue
|
||||
last_stmt = s
|
||||
@@ -589,7 +589,7 @@ class Scanner2(scan.Scanner):
|
||||
|
||||
target = self.get_target(jump_back, self.opc.JUMP_ABSOLUTE)
|
||||
|
||||
if (self.version >= 2.0 and
|
||||
if (self.version > 2.1 and
|
||||
code[target] in (self.opc.FOR_ITER, self.opc.GET_ITER)):
|
||||
loop_type = 'for'
|
||||
else:
|
||||
|
Reference in New Issue
Block a user