def __hash__ ( self ) : return hash ( ( type ( self ) , self . domain , self . range , self . partition ) )
is an object in python hashable
Return hash ( self ) .
def __hash__(self):
        """Return ``hash(self)``."""
        return hash((type(self), self.domain, self.range, self.partition))