On Jul 8, 2005, at 10:56 AM, Mario Ruggier wrote:
> def __cmp__(self, other):
> if self is other:
> return 0
> return cmp(self._id, other._id)
I've had to change this a little ... ;-)
def __cmp__(self, other):
if self is other:
return 0
try:
return cmp(self._id, other._id)
except:
return cmp(self._id, other)
for when other does not have _id attribute.
Is this a good handling for this?
btw, this method is on the PersistentItem class...
mario