cf.CellMeasure.hasattr

CellMeasure.hasattr(attr)[source]

Return whether an attribute exists.

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

See also

delattr, getattr, setattr

Parameters:
attr : str

The attribute’s name.

Returns:
out : bool

Whether the object has the attribute.

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

Previous topic

cf.CellMeasure.getprop

Next topic

cf.CellMeasure.hasprop

This Page