pytholite/transel: use python3-compatible comparison methods
This commit is contained in:
parent
6434ddd95a
commit
e92af9de59
|
@ -156,8 +156,23 @@ class Register:
|
||||||
def __index__(self):
|
def __index__(self):
|
||||||
return int(self._val)
|
return int(self._val)
|
||||||
|
|
||||||
def __cmp__(self, other):
|
def __lt__(self, other):
|
||||||
return cmp(self._val, other)
|
return self._val < other
|
||||||
|
|
||||||
|
def __le__(self, other):
|
||||||
|
return self._val <= other
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return self._val == other
|
||||||
|
|
||||||
|
def __ge__(self, other):
|
||||||
|
return self._val >= other
|
||||||
|
|
||||||
|
def __gt__(self, other):
|
||||||
|
return self._val > other
|
||||||
|
|
||||||
|
def __ne__(self, other):
|
||||||
|
return self._val != other
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return str(self._val)
|
return str(self._val)
|
||||||
|
|
Loading…
Reference in New Issue