- def __cmp__(self, other):
- ret = cmp(self.name, other.name)
- if ret != 0: return ret
- ret = cmp(self.legal, other.legal)
- if ret != 0: return ret
- ret = cmp(self.doc, other.doc)
- if ret != 0: return ret
- ret = cmp(self.code, other.code)
- return ret
+ def __eq__(self, other):
+ return \
+ self.name == other.name and \
+ self.legal == other.legal and \
+ self.doc == other.doc and \
+ self.code == other.code
+
+ def __ne__(self, other):
+ return not self == other