* Python3 ignores cmp() and __cmp__() and only needs __lt__() for
sorting. Delete and update as appropriate.
* Ref: https://docs.python.org/3.0/whatsnew/3.0.html#ordering-comparisons
else:
raise NotImplementedError(desc.type)
- def __cmp__(self, other):
- return cmp(self.tag, other.tag)
+ def __lt__(self, other):
+ return self.tag < other.tag
def __str__(self):
result = ''
# Sort by the lowest tag number inside union
self.tag = min([f.tag for f in self.fields])
- def __cmp__(self, other):
- return cmp(self.tag, other.tag)
-
def __str__(self):
result = ''
if self.fields: