A base-class for coder-friendly and TAL-friendly element
collections.
Subclasses must override either __iter__ or both __len__ and
__getitem__.
In most cases, it is a good idea to override __contains__, and __len__
(even if the subclass is overriding __iter__).
The class attribute _allow_filtering can also be overridden to
disallow the use of the filter method.
|
|
|
|
|
__iter__(self)
Default implementation relying on __len__ and __getitem__. |
source code
|
|
|
__len__(self)
Default (and inefficient) implementation relying on __iter__. |
source code
|
|
|
__getitem__(self,
key)
Default implementation relying on __iter__. |
source code
|
|
|
|
|
|
|
|
|
filter(collection,
**kw)
Use underlying iter method with the given keywords to make a filtered
version of that collection. |
source code
|
|
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__str__
|