I think this should be ``self.__class__ == other.__class__``