diff --git a/bitfield/types.py b/bitfield/types.py index f61d7a3..5a59836 100644 --- a/bitfield/types.py +++ b/bitfield/types.py @@ -122,6 +122,18 @@ def __eq__(self, other): return False return self._value == other._value + def __lt__(self, other): + return int(self._value) < other + + def __le__(self, other): + return int(self._value) <= other + + def __gt__(self, other): + return int(self._value) > other + + def __ge__(self, other): + return int(self._value) >= other + def __cmp__(self, other): return cmp(self._value, other)