cf.CellMeasure.getattr

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

Get a named attribute.

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

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.

See also

delattr hasattr, setattr

Examples

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

Previous topic

cf.CellMeasure.flip

Next topic

cf.CellMeasure.getprop

This Page