NamedValueMutableSet¶
- class lsst.daf.butler.NamedValueMutableSet¶
- Bases: - NamedValueAbstractSet[- K],- MutableSet[- K]- Mutable variant of - NamedValueAbstractSet.- Methods that can add new elements to the set are unchanged from their - MutableSetdefinitions, while those that only remove them can generally accept names or element instances.- popcan be used in either its- MutableSetform (no arguments; an arbitrary element is returned) or its- MutableMappingform (one or two arguments for the name and optional default value, respectively). A- MutableMapping-like- __delitem__interface is also included, which takes only names (like- NamedValueAbstractSet.__getitem__).- Methods Summary - discard(element)- Remove an element from the set if it exists. - pop(*args)- Remove and return an element from the set. - remove(element)- Remove an element from the set. - Methods Documentation - abstract discard(element: str | K) Any¶
- Remove an element from the set if it exists. - Does nothing if no matching element is present. 
 - abstract pop(*args: str) K¶
- Remove and return an element from the set. - Parameters:
- *argsstr, optional
- Name of the element to remove and return. Must be passed positionally. If not provided, an arbitrary element is removed and returned. 
 
- *args
- Raises:
- KeyError
- Raised if - nameis provided but- defaultis not, and no matching element exists.