Help to delay list evaluation to the latest possible moment.
This class is useful if you have a function returning a list, and
you might need a certain element from that list later. Encapsulating
the call in a CalledElement will make sure that the function returning
the list is only called when a reference is being made to this element.
|
Methods
|
|
__call__ __getattr__ __init__ __repr__
|
|
|
__call__
|
__call__ (
self,
*arg,
*kw,
)
|
|
|
__getattr__
|
__getattr__ ( self, attr )
|
Exceptions
|
|
AttributeError( "Filling %s %s", self, attr )
|
|
|
|
__init__
|
__init__ (
self,
listfunc,
itemno,
)
Constructor.
- listfunc
A function returning a list
- itemno
the element number in the list we are interested in
|
|
|
__repr__
|
__repr__ ( self )
|
|