a few extensions for the itertools

Gabriel Genellina gagsl-py at yahoo.com.ar
Mon Nov 20 04:22:16 CET 2006

At Sunday 19/11/2006 17:35, Mathias Panzenboeck wrote:

>I wrote a few functions which IMHO are missing in python(s itertools).
>You can download them here:
>isum(iterable, start=0) -> value
>         Returns the sum of the elements of a iterable
>         plus the value of parameter 'start'.  When the
>         iterable is empty, returns start.

Isn't the same as the builtin sum?

>iproduct(iterable, start=0) -> value

As others said, start should be 1

>fcain(funct,*functs) -> function(...,***)
>         fcain(f1,f2,...,fn)(*args,*kwargs) equals 
> f1(f2(...fn(*args,*kwargs)))

I don't understand it, nor even the signature. Perhaps it tries to be 
"fchain", function composition? But what has it to do with iterables?

Gabriel Genellina
Softlab SRL 

Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar

More information about the Python-list mailing list