cf.FieldList.delattr

FieldList.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

Examples

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

Previous topic

cf.FieldList.datum

Next topic

cf.FieldList.delprop

This Page