entity.py
branchstable
changeset 3000 4e76477949d5
parent 2928 edfdb69df6e8
child 3002 a9d7eaa07475
child 3047 ba86b1bdbcab
equal deleted inserted replaced
2999:0bf6c52447d0 3000:4e76477949d5
   312     def __nonzero__(self):
   312     def __nonzero__(self):
   313         return True
   313         return True
   314 
   314 
   315     def __hash__(self):
   315     def __hash__(self):
   316         return id(self)
   316         return id(self)
       
   317 
       
   318     def __cmp__(self):
       
   319         raise NotImplementedError('comparison not implemented for %s' % self.__class__)
   317 
   320 
   318     def pre_add_hook(self):
   321     def pre_add_hook(self):
   319         """hook called by the repository before doing anything to add the entity
   322         """hook called by the repository before doing anything to add the entity
   320         (before_add entity hooks have not been called yet). This give the
   323         (before_add entity hooks have not been called yet). This give the
   321         occasion to do weird stuff such as autocast (File -> Image for instance).
   324         occasion to do weird stuff such as autocast (File -> Image for instance).