cfdm.CellMethod.identities

CellMethod.identities(generator=False, **kwargs)[source]

Return all possible identities.

The identities comprise:

  • The method, preceded by ‘method:’.

New in version (cfdm): 1.7.0

See also

identity

Parameters
generator: bool, optional

If True then return a generator for the identities, rather than a list.

New in version (cfdm): 1.8.9.0

kwargs: optional

Additional configuration parameters that may be used by subclasses.

New in version (cfdm): 1.8.9.0

Returns
list or generator

The identities.

Examples

>>> f = cfdm.example_field(1)
>>> c = f.get_construct('cellmethod1')
>>> c.get_method()
'maximum'
>>> c.identities()
['method:maximum']
>>> c.del_method()
'maximum'
>>> c.identities()
[]
>>> for i in c.identities(generator=True):
...     print(i)
...