def _equivalent(self, other):
if other.__class__ is not self.__class__:  <EOL><INDENT>raise NotImplementedError('<STR_LIT>'<EOL>'<STR_LIT>' % (self.__class__.__name__,<EOL>other.__class_.__name__))<EOL><DEDENT>if set(self._projection) != set(other._projection):<EOL><INDENT>return False<EOL><DEDENT>if len(self._properties) != len(other._properties):<EOL><INDENT>return False  <EOL><DEDENT>my_prop_names = set(self._properties.iterkeys())<EOL>their_prop_names = set(other._properties.iterkeys())<EOL>if my_prop_names != their_prop_names:<EOL><INDENT>return False  <EOL><DEDENT>if self._projection:<EOL><INDENT>my_prop_names = set(self._projection)<EOL><DEDENT>for name in my_prop_names:<EOL><INDENT>if '<STR_LIT:.>' in name:<EOL><INDENT>name, _ = name.split('<STR_LIT:.>', <NUM_LIT:1>)<EOL><DEDENT>my_value = self._properties[name]._get_value(self)<EOL>their_value = other._properties[name]._get_value(other)<EOL>if my_value != their_value:<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Compare two entities of the same class, excluding keys.