Skip to content

Commit

Permalink
Merge pull request #51 from donald-m-ritter/master
Browse files Browse the repository at this point in the history
Update types.py
  • Loading branch information
dcramer committed Jan 19, 2015
2 parents 58b215a + babd4d8 commit 2c864e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bitfield/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 2c864e0

Please sign in to comment.