def __eq__(self, other):
if other.__class__ is not self.__class__:<EOL><INDENT>return NotImplemented<EOL><DEDENT>if self._key != other._key:<EOL><INDENT>return False<EOL><DEDENT>return self._equivalent(other)<EOL>
Compare two entities of the same class for equality.