def __lt__ self other return self __cmp__ other -1 def __gt__ self oth

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
def __lt__(self, other):
return self.__cmp__(other) == -1
def __gt__(self, other):
return self.__cmp__(other) == 1
def __eq__(self, other):
return self.__cmp__(other) == 0
def __le__(self, other):
return self.__lt__(other) or self.__eq__(other)
def __ge__(self, other):
return self.__gt__(other) or self.__eq__(other)
def __ne__(self, other):
return not self.__eq__(other)