cf.CellMethod.get_qualifier

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

Return a qualifier of the cell method.

New in version (cfdm): 1.7.0

Parameters
qualifier:

The name of the qualifier to be returned.

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 value of the qualifier.

Examples

>>> c = cf.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.get_qualifier('where', 'no qualifier')
'no qualifier'