aboutsummaryrefslogtreecommitdiffstats
path: root/pathod/language
diff options
context:
space:
mode:
authorShadab Zafar <dufferzafar0@gmail.com>2016-05-31 20:02:01 +0530
committerShadab Zafar <dufferzafar0@gmail.com>2016-06-06 00:07:44 +0530
commitbda30efb35af25027b16b478e3916c97f52b5157 (patch)
treeffe168677ba7a0fe0998d0a4c6ea00eb1501a4a3 /pathod/language
parent7b6da987193aa7bf9e7f9a0f892577d4c853910c (diff)
downloadmitmproxy-bda30efb35af25027b16b478e3916c97f52b5157.tar.gz
mitmproxy-bda30efb35af25027b16b478e3916c97f52b5157.tar.bz2
mitmproxy-bda30efb35af25027b16b478e3916c97f52b5157.zip
Py3: Use rich comparison methods (__eq__, __lt__) instead of __cmp__
Diffstat (limited to 'pathod/language')
-rw-r--r--pathod/language/actions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pathod/language/actions.py b/pathod/language/actions.py
index 34a9bafb..2aea870f 100644
--- a/pathod/language/actions.py
+++ b/pathod/language/actions.py
@@ -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()