forgot __ne__ function for python 2 compatibility in Definition

This commit is contained in:
Dave Halter
2014-04-18 14:53:43 +02:00
parent 0301606d18
commit efc24a9ecc

View File

@@ -658,10 +658,14 @@ class Definition(use_metaclass(CachedMetaClass, BaseDefinition)):
def __eq__(self, other):
return self._start_pos == other._start_pos \
and self.module_path == other.module_path \
and self.name == other.name
and self.name == other.name \
and self._evaluator == other._evaluator
def __ne__(self, other):
return not self.__eq__(other)
def __hash__(self):
return hash((self._start_pos, self.module_path, self.name))
return hash((self._start_pos, self.module_path, self.name, self._evaluator))
class CallSignature(Definition):