mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 23:09:44 +00:00
Py3: Use rich comparison methods (__eq__, __lt__) instead of __cmp__
This commit is contained in:
parent
7b6da98719
commit
bda30efb35
@ -31,8 +31,11 @@ class _Action(base.Token):
|
||||
c.offset = l + 1
|
||||
return c
|
||||
|
||||
def __cmp__(self, other):
|
||||
return cmp(self.offset, other.offset)
|
||||
def __lt__(self, other):
|
||||
return self.offset < other.offset
|
||||
|
||||
def __eq__(self, other):
|
||||
return self.offset == other.offset
|
||||
|
||||
def __repr__(self):
|
||||
return self.spec()
|
||||
|
Loading…
Reference in New Issue
Block a user