cfdm.core.abstract.Container._del_component¶
-
Container.
_del_component
(component, default=ValueError())[source]¶ Remove a component.
New in version 1.7.0.
See also
Parameters: - component:
The name of the component to be removed.
- default: optional
Return default if the component has not been set.
Returns: The removed component. If unset then default is returned, if provided.
Examples:
>>> f._set_component('foo', 'bar') >>> f._has_component('foo') True >>> f._get_component('foo') 'bar' >>> f._del_component('foo') 'bar' >>> f._has_component('foo') False