Browse Source

fix bug with __neg__

David Rose 21 years ago
parent
commit
9c079fa100
1 changed files with 3 additions and 0 deletions
  1. 3 0
      direct/src/extensions/ConfigVariable-extensions.py

+ 3 - 0
direct/src/extensions/ConfigVariable-extensions.py

@@ -30,6 +30,9 @@
     def __cmp__(self, other):
     def __cmp__(self, other):
         return self.getValue().__cmp__(other)
         return self.getValue().__cmp__(other)
 
 
+    def __neg__(self):
+        return -self.getValue()
+
     def __coerce__(self, other):
     def __coerce__(self, other):
         return (self.getValue(), other)
         return (self.getValue(), other)