cfdm.Domain.set_property

Domain.set_property(prop, value, copy=True)[source]

Set a property.

New in version (cfdm): 1.7.0

Parameters
prop: str

The name of the property to be set.

value:

The value for the property.

copy: bool, optional

If True then set a deep copy of value.

Returns

None

Examples

>>> f = cfdm.Domain()
>>> f.set_property('project', 'CMIP7')
>>> f.has_property('project')
True
>>> f.get_property('project')
'CMIP7'
>>> f.del_property('project')
'CMIP7'
>>> f.has_property('project')
False
>>> print(f.del_property('project', None))
None
>>> print(f.get_property('project', None))
None