This seems a bit redundant.  Assuming you didn't want an object with a class that is a subclass of the other object to be comparable, this is equivalent to `self.__class__ is other.__class__`.