def discard(self, k, v=None):
        """
        Remove element v from a set DS[k]; it must be a member.
        If the element v is not a member of D[k], do nothing.
            
        If v is not supplied removes DS[k].
        If D[k] is not an item, raise a KeyError.
        """

        if v != None:
            try:
                self[k].discard(v)
            except:
                pass
        else:
            try:
                del self[k]
            except:
                pass

        Remove element v from a set DS[k]; it must be a member.
        If the element v is not a member of D[k], do nothing.
            
        If v is not supplied removes DS[k].
        If D[k] is not an item, raise a KeyError.
        
recipes/Python/577702_DictSet__specialized_Pythcontainer_datatype/recipe-577702.py