cf.Domain.del_properties¶
-
Domain.
del_properties
(properties)[source]¶ Remove properties.
New in version (cfdm): 1.10.0.3
See also
- Parameters
- properties: (sequence of)
str
The names of the properties to be removed. If the
Domain
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']
- properties: (sequence of)
- Returns
dict
The removed property values, keyed by property name.
Examples
>>> f = cf.Domain() >>> 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') {}