def __eq__(self, other):
if self.__class__ is not other.__class__:<EOL><INDENT>return False<EOL><DEDENT>return all(getattr(self, attr) == getattr(other, attr)<EOL>for attr in self.__slots__)<EOL>
Common `__eq__` implementation for classes which has `__slots__`.