Ver código fonte

fix bug with __neg__

David Rose 21 anos atrás
pai
commit
9c079fa100
1 arquivos alterados com 3 adições e 0 exclusões
  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):
         return self.getValue().__cmp__(other)
 
+    def __neg__(self):
+        return -self.getValue()
+
     def __coerce__(self, other):
         return (self.getValue(), other)