cf.FieldList.identity

FieldList.identity(default=None)

Return the identity.

The identity is the first found of the following:

  • The standard_name CF property.
  • The id attribute.
  • The value of the default parameter.

See also

name

Parameters:
default : optional

The identity if one could not otherwise be found. By default, default is None.

Returns:
out :

The identity.

Examples:
>>> f.standard_name = 'Kelvin'
>>> f.id = 'foo'
>>> f.identity()
'Kelvin'
>>> del f.standard_name
>>> f.identity()
'foo'
>>> del f.id
>>> f.identity()
None
>>> f.identity('bar')
'bar'
>>> print f.identity()
None