(self, other)
Subclasses should implement this method for anything more complex than equality.
Subclasses should implement this method for anything more complex than equality.
Subclasses should implement this method for anything more complex than equality .
def __contains__(self, other):
        """Subclasses should implement this method for anything more complex than equality."""
        if type(self) == type(other):
            return self == other
        raise NotImplementedError()
def __contains__ ( self , other ) : if type ( self ) == type ( other ) : return self == other raise NotImplementedError ( )