diff --git a/pathod/language/actions.py b/pathod/language/actions.py index 34a9bafb5..2aea870fb 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()