cf.DimensionCoordinate.getattr

DimensionCoordinate.getattr(attr, *default)[source]

Get a named attribute.

f.getattr(attr, *default) is equivalent to getattr(f, attr, *default).

See also

delattr, hasattr, setattr

Parameters:
attr : str

The attribute’s name.

default : optional

When a default argument is given, it is returned when the attribute doesn’t exist; without it, an exception is raised in that case.

Returns:
out :

The attribute’s value.

Examples:
>>> f.foo = -99
>>> fl.getattr('foo')
-99
>>> del f.foo
>>> fl.getattr('foo', 'bar')
'bar'

Previous topic

cf.DimensionCoordinate.get_bounds

Next topic

cf.DimensionCoordinate.getprop

This Page