cf.CoordinateBounds.hasattr

CoordinateBounds.hasattr(attr)[source]

Return whether an attribute exists.

f.hasattr(attr) is equivalent to hasattr(f, attr).

Parameters :
attr : str

The attribute’s name.

Returns :
out : bool

Whether the object has the attribute.

See also

delattr, getattr, setattr

Examples

>>> f.foo = -99
>>> fl.hasattr('foo')
True
>>> del f.foo
>>> fl.hasattr('foo')
False

Previous topic

cf.CoordinateBounds.getprop

Next topic

cf.CoordinateBounds.hasprop

This Page