cf.Datum.del_parameter

Datum.del_parameter(parameter, default=ValueError())[source]

Delete a parameter.

New in version 1.7.0.

Parameters:
parameter: str

The name of the parameter to be deleted.

default: optional

Return the value of the default parameter if the parameter has not been set. If set to an Exception instance then it will be raised instead.

Returns:

The removed parameter. If the parameter has not been then default is returned, if provided.

Examples:

>>> f.set_parameter('earth_radius', 6371007)
>>> f.has_parameter('earth_radius')
True      
>>> f.get_parameter('earth_radius')
6371007   
>>> f.del_parameter('earth_radius')
6371007   
>>> f.has_parameter('earth_radius')
False
>>> print(f.del_parameter('earth_radius', None))
None
>>> print(f.get_paramete('earth_radius', None))
None