cf.CfList

class cf.CfList(sequence=())

Bases: _abcoll.MutableSequence

A list-like object with attributes.

Initialization

Parameters :
sequence : iterable, optional

Define a new list with these elements.

copy()

Return a deep copy.

Equivalent to copy.deepcopy(x)

Returns :
out :

The deep copy.

Examples

>>> x.copy()
count(value) → integer -- return number of occurrences of value

Uses numerically tolerant equality.

equals(other, rtol=None, atol=None)

Return True if two lists are congruent in that

  1. Each pair of their elements are equal.
  2. Both instances have equal attributes.

Numerical equality is to within a tolerance. Refer to cf for details.

Parameters:
  • other (object) – The variable to compare against for equality.
  • atol (None or float) – Optional. If None then use the default method for setting the absolute tolerance for numerical equality (refer to cf for details). If a number then set the absolute tolerance to this value for all such comparisons.
  • rtol (None or float) – Optional. If None then use the default method for setting the relative tolerance for numerical equality (refer to cf for details). If a number then set the relative tolerance to this value for all such comparisons.
Returns:

True if the two objects are congruent, False otherwise.

index(value[, start[, stop]]) → integer -- return first index of value

Uses numerically tolerant equality.

insert(index, object)

CFL.insert(index, object) – insert object before index

Previous topic

cf.FieldList

Next topic

cf.CfDict

This Page