cf.Domain.pop

Domain.pop(key, *default)[source]

Remove specified key from the domain in-place and return the corresponding value.

Note that the dimensions attribute is not updated.

Parameters :

key : str

default : optional

If key is not found then default is returned if given, otherwise a KeyError is raised.

Returns :
out : cf.Coordinate or cf.CellMeasure

The returned variable (or default).

Examples

>>> d.pop('dim0')
>>> d.pop('aux1')
>>> d.pop('cm2')
>>> d.pop('aux1', None)

Previous topic

cf.Domain.new_transform_identifier

Next topic

cf.Domain.popitem

This Page