schema.py
changeset 8892 80783605d270
parent 8695 358d8bed9626
child 8945 ba9e3fbfa5a5
--- a/schema.py	Mon Apr 08 17:33:49 2013 +0200
+++ b/schema.py	Mon Apr 22 14:54:22 2013 +0200
@@ -700,10 +700,15 @@
     def __repr__(self):
         return '%s(%s)' % (self.__class__.__name__, self.full_rql)
 
-    def __cmp__(self, other):
+    def __lt__(self, other):
         if hasattr(other, 'expression'):
-            return cmp(other.expression, self.expression)
-        return -1
+            return self.expression < other.expression
+        return True
+
+    def __eq__(self, other):
+        if hasattr(other, 'expression'):
+            return self.expression == other.expression
+        return False
 
     def __deepcopy__(self, memo):
         return self.__class__(self.expression, self.mainvars)