mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
pytholite/transel: use python3-compatible comparison methods
This commit is contained in:
parent
6434ddd95a
commit
e92af9de59
1 changed files with 17 additions and 2 deletions
|
@ -156,8 +156,23 @@ class Register:
|
|||
def __index__(self):
|
||||
return int(self._val)
|
||||
|
||||
def __cmp__(self, other):
|
||||
return cmp(self._val, other)
|
||||
def __lt__(self, 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):
|
||||
return str(self._val)
|
||||
|
|
Loading…
Reference in a new issue