cfdm.core.Container._set_component

Container._set_component(component, value, copy=True)[source]

Set a component.

New in version (cfdm): 1.7.0

Parameters
component: str

The name of the component.

value:

The value for the component.

Returns

None

Examples

>>> f = cfdm.core.Container()
>>> 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