cfdm.Field.del_properties

Field.del_properties(properties)[source]

Remove properties.

New in version (cfdm): 1.10.0.3

Parameters
properties: (sequence of) str

The names of the properties to be removed. If the Field does not have a particular property then that property is ignored. No properties are removed if properties is an empty sequence.

Parameter example:

'long_name'

Parameter example:

['long_name', 'comment']

Returns
dict

The removed property values, keyed by property name.

Examples

>>> f = cfdm.Field()
>>> f.set_properties({'project': 'CMIP7', 'comment': 'model'})
>>> removed_properties = f.del_properties('project')
>>> removed_properties
{'project': 'CMIP7'}
>>> f.properties()
{'comment': 'model'}
>>> f.set_properties(removed_properties)
>>> f.properties()
{'comment': 'model', 'project': 'CMIP7'}
>>> f.del_properties('foo')
{}