__cmp__ should *NOT* return False when different
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 09 Dec 2009 09:52:28 +0100
changeset 4066 0555f170c4d1
parent 4063 cf7d6211d957
child 4067 c49fba955a9c
__cmp__ should *NOT* return False when different
schema.py
--- a/schema.py	Tue Dec 08 19:25:52 2009 +0100
+++ b/schema.py	Wed Dec 09 09:52:28 2009 +0100
@@ -726,7 +726,7 @@
     def __cmp__(self, other):
         if hasattr(other, 'expression'):
             return cmp(other.expression, self.expression)
-        return False
+        return -1
 
     def __deepcopy__(self, memo):
         return self.__class__(self.expression, self.mainvars)