Make __cmp__() functions stable
diff --git a/Lib/fontTools/ttLib/tables/otBase.py b/Lib/fontTools/ttLib/tables/otBase.py
index 0f6a4e8..8eec6b0 100644
--- a/Lib/fontTools/ttLib/tables/otBase.py
+++ b/Lib/fontTools/ttLib/tables/otBase.py
@@ -288,9 +288,8 @@
 		return hash(self.items)
 	
 	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.items, other.items)
 	
@@ -671,9 +670,8 @@
 			setattr(self, conv.name, value)
 	
 	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__)
 
@@ -835,8 +833,7 @@
 			setattr(self, name, value)
 	
 	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__)