Make __cmp__() functions stable
diff --git a/Lib/fontTools/ttLib/tables/DefaultTable.py b/Lib/fontTools/ttLib/tables/DefaultTable.py
index ff45bc3..8d68ec0 100644
--- a/Lib/fontTools/ttLib/tables/DefaultTable.py
+++ b/Lib/fontTools/ttLib/tables/DefaultTable.py
@@ -37,9 +37,8 @@
return "<'%s' table at %x>" % (self.tableTag, id(self))
def __cmp__(self, other):
- if type(self) != type(other) or \
- self.__class__ != other.__class__:
- return cmp(id(self), id(other))
+ if type(self) != type(other): return cmp(type(self), type(other))
+ if self.__class__ != other.__class__: return cmp(self.__class__, other.__class__)
return cmp(self.__dict__, other.__dict__)