(self, value)
return self
Remove an element.

        It will warn if the value to discard is inexistent. Raise if
        invalid type of value is given.

        Parameters
        ----------
        value: tuple
            Index for adding. Raise if index is out of bound.

        Returns
        -------
        self: object
            return self.
Remove an element.
Remove an element .
def discard(self, value):
        """Remove an element.

        It will warn if the value to discard is inexistent. Raise if
        invalid type of value is given.

        Parameters
        ----------
        value: tuple
            Index for adding. Raise if index is out of bound.

        Returns
        -------
        self: object
            return self.
        """
        assert (isinstance(value, tuple))
        if len(value) == 1:
            value = [(value[0], i) for i in range(self._label_size)]
            return self.difference_update(value)
        if value not in self._innercontainer:
            warnings.warn("Element %s to discard is not in the collection, skip." % (value.__str__()),
                          category=InexistentElementWarning,
                          stacklevel=3)
        else:
            self._innercontainer.discard(value)
        return self
def discard ( self , value ) : assert ( isinstance ( value , tuple ) ) if len ( value ) == 1 : value = [ ( value [ 0 ] , i ) for i in range ( self . _label_size ) ] return self . difference_update ( value ) if value not in self . _innercontainer : warnings . warn ( "Element %s to discard is not in the collection, skip." % ( value . __str__ ( ) ) , category = InexistentElementWarning , stacklevel = 3 ) else : self . _innercontainer . discard ( value ) return self