entity.py
changeset 10613 8d9fe02387e3
parent 10612 84468b90e9c1
child 10662 10942ed172de
--- a/entity.py	Mon Sep 14 16:03:07 2015 +0200
+++ b/entity.py	Thu Sep 17 09:52:06 2015 +0200
@@ -22,7 +22,7 @@
 from warnings import warn
 from functools import partial
 
-from six import string_types
+from six import string_types, integer_types
 from six.moves import range
 
 from logilab.common.decorators import cached
@@ -548,12 +548,12 @@
         raise NotImplementedError('comparison not implemented for %s' % self.__class__)
 
     def __eq__(self, other):
-        if isinstance(self.eid, (int, long)):
+        if isinstance(self.eid, integer_types):
             return self.eid == other.eid
         return self is other
 
     def __hash__(self):
-        if isinstance(self.eid, (int, long)):
+        if isinstance(self.eid, integer_types):
             return self.eid
         return super(Entity, self).__hash__()