From d855d6c85a1ac4dd3badb61c28a47384f818b0ad Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Mon, 26 Jul 2004 21:44:49 +0000 Subject: [PATCH] better cmp operator for mismatched classes --- direct/src/ffi/FFIExternalObject.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direct/src/ffi/FFIExternalObject.py b/direct/src/ffi/FFIExternalObject.py index d24645b589..6d6da9d8b2 100644 --- a/direct/src/ffi/FFIExternalObject.py +++ b/direct/src/ffi/FFIExternalObject.py @@ -183,8 +183,9 @@ class FFIExternalObject: if isinstance(other, self.__class__): return self.compareTo(other) # Otherwise, they must not be the same + # Just do a basic python id compare else: - return 1 + return cmp(id(self), id(other)) def __repr__(self): # Lots of Panda classes have an output function defined that takes an Ostream