cf.List

class cf.List(elements=None)[source]

Bases: _abcoll.MutableSequence

A list-like object with attributes.

Initialization

Parameters :
sequence : iterable, optional

Define a new list with these elements.

List methods

copy Return a deep copy.
count Return the number of occurrences of a value
delattr Delete a named attribute on each element of the list.
equals True if two instances are equal, False otherwise.
getattr Get a named attribute from each element of the list.
index Return the first index of a value.
iter Return an iterator over the results of a method applied to each element.
method Return an list of the results of a method applied to each element.
setattr Set a named attribute on each element of the list.

List list-like methods

These methods provide functionality exactly as their counterparts in a built-in list.

append
extend
insert
pop
remove
reverse
sort

Table Of Contents

Previous topic

cf.Dict.values

Next topic

cf.List.copy

This Page