Package duplicity :: Module lazy :: Class Iter
[hide private]
[frames] | no frames]

Class Iter

source code

Hold static methods for the manipulation of lazy iterators

Static Methods [hide private]
 
And(iter)
True if all elements in iterator are true.
source code
 
Or(iter)
True if any element in iterator is true.
source code
 
cat(*iters)
Lazily concatenate iterators
source code
 
cat2(iter_of_iters)
Lazily concatenate iterators, iterated by big iterator
source code
 
empty(iter)
True if iterator has length 0
source code
 
equal(iter1, iter2, verbose=None, operator=<function <lambda> at 0x2980050>)
True if iterator 1 has same elements as iterator 2
source code
 
filter(predicate, iterator)
Like filter in a lazy functional programming language
source code
 
foldl(f, default, iter)
the fundamental list iteration operator..
source code
 
foldr(f, default, iter)
foldr the "fundamental list recursion operator"?
source code
 
foreach(function, iterator)
Run function on each element in iterator
source code
 
len(iter)
Return length of iterator
source code
 
map(function, iterator)
Like map in a lazy functional programming language
source code
 
multiplex(iter, num_of_forks, final_func=None, closing_func=None)
Split a single iterater into a number of streams
source code
Method Details [hide private]

And(iter)
Static Method

source code 

True if all elements in iterator are true. Short circuiting

Or(iter)
Static Method

source code 

True if any element in iterator is true. Short circuiting

equal(iter1, iter2, verbose=None, operator=<function <lambda> at 0x2980050>)
Static Method

source code 

True if iterator 1 has same elements as iterator 2

Use equality operator, or == if it is unspecified.

multiplex(iter, num_of_forks, final_func=None, closing_func=None)
Static Method

source code 

Split a single iterater into a number of streams

The return val will be a list with length num_of_forks, each of which will be an iterator like iter. final_func is the function that will be called on each element in iter just as it is being removed from the buffer. closing_func is called when all the streams are finished.