cfdm.core.CellMethod.del_qualifier

CellMethod.del_qualifier(qualifier, default=ValueError())[source]

Remove a qualifier of the cell method.

New in version (cfdm): 1.7.0

Parameters
qualifier:

The name of the qualifier to be removed.

Parameter example:

qualifier='where'

default: optional

Return the value of the default parameter if the qualifier has not been set.

If set to an Exception instance then it will be raised instead.

Returns

The removed qualifier.

Examples:

>>> c = cfdm.core.CellMethod()
>>> c.set_qualifier('where', 'land')
>>> c.get_qualifier('where', 'no qualifier')
'land'
>>> c.del_qualifier('where')
'land'
>>> c.get_qualifier('where')
ValueError: 'CellMethod' has no 'where' qualifier
>>> c.del_qualifier('where', 'no qualifier')
'no qualifier'