B [entities] #343385 comparing entities should raise NotImplementedError stable
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Tue, 25 Aug 2009 23:34:30 +0200
branchstable
changeset 3000 4e76477949d5
parent 2999 0bf6c52447d0
child 3001 74e842e4871a
B [entities] #343385 comparing entities should raise NotImplementedError
entity.py
--- a/entity.py	Tue Aug 25 23:29:05 2009 +0200
+++ b/entity.py	Tue Aug 25 23:34:30 2009 +0200
@@ -315,6 +315,9 @@
     def __hash__(self):
         return id(self)
 
+    def __cmp__(self):
+        raise NotImplementedError('comparison not implemented for %s' % self.__class__)
+
     def pre_add_hook(self):
         """hook called by the repository before doing anything to add the entity
         (before_add entity hooks have not been called yet). This give the