Browse Source

Fix pmerge to work with Python 3

Python 3 uses __lt__ and __gt__ instead of __cmp__.
Mitchell Stokes 9 years ago
parent
commit
093647365f
1 changed files with 6 additions and 0 deletions
  1. 6 0
      direct/src/p3d/SeqValue.py

+ 6 - 0
direct/src/p3d/SeqValue.py

@@ -77,6 +77,12 @@ class SeqValue:
         """ Compares to another seq value. """
         """ Compares to another seq value. """
         return cmp(self.value, other.value)
         return cmp(self.value, other.value)
 
 
+    def __lt__(self, other):
+        return self.value < other.value
+
+    def __gt__(self, other):
+        return self.value > other.value
+
     def __bool__(self):
     def __bool__(self):
         return bool(self.value)
         return bool(self.value)