Added a give command to the default command set. As part of this also fixed some bugs in how object typeclasses were compared.

This commit is contained in:
Griatch 2012-12-08 17:11:22 +01:00
parent 949da47917
commit c615693a2a
8 changed files with 53 additions and 21 deletions

View file

@ -157,10 +157,9 @@ class TypeClass(object):
dbobj-recognized comparison
"""
try:
return other == self or other == _GA(self, dbobj) or other == _GA(self, dbobj).user
return _GA(_GA(self, "dbobj"), "dbid") == _GA(_GA(other, "dbobj"), "dbid")
except AttributeError:
# if self.dbobj.user fails it means the two previous comparisons failed already
return False
return id(self) == id(other)
def __delattr__(self, propname):