cf.Field.hasattr

Field.hasattr(attr)

Return True if the variable has standard or non-standard CF attribute.

Parameters :
attr : str

The name of the attribute.

Returns :
out : bool

True if the instance has the attribute.

Examples

>>> f.hasattr('standard_name')
>>> f.hasattr('foo')

Previous topic

cf.Field.finalize

Next topic

cf.Field.match

This Page