cf.AncillaryVariables.delattr

AncillaryVariables.delattr(attr)[source]

Delete a named attribute on each element of the list.

fl.delattr(attr) is equivalent to for f in fl: del f.attr.

Parameters:
attr : str

The attribute’s name.

Returns:

None

See also

getattr, hasattr, setattr

Examples:
>>> fl.getattr('foo')
['bar1', 'bar2']
>>> fl.delattr('foo')
>>> fl.getattr('foo', None)
[None, None]

Previous topic

cf.AncillaryVariables.datum

Next topic

cf.AncillaryVariables.delprop

This Page