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.6 compatability via ericfrederich's patch. DRY version-checking code
This commit is contained in:
@@ -332,8 +332,8 @@ class Token(scanner.Token):
|
||||
return 0
|
||||
if JUMP_OPs and t in JUMP_OPs:
|
||||
# ignore offset
|
||||
return cmp(t, o.type)
|
||||
return cmp(t, o.type) or cmp(self.pattr, o.pattr)
|
||||
return t == o.type
|
||||
return (t == o.type) or self.pattr == o.pattr
|
||||
|
||||
def __repr__(self):
|
||||
return '%s %s (%s)' % (str(self.type), str(self.attr),
|
||||
|
Reference in New Issue
Block a user