"Collapsing" a list into a list of changes

Francis Girard francis.girard at free.fr
Mon Feb 7 13:58:51 EST 2005


No. Just wanted to naively use one of the base tool Python had to offer. I 
tought it was very usable and very readable. I might be wrong.

Is there someone on this list using this tool and happy with it ? Or is my 
mind too much targeted on FP paradigm and most of you really think that all 
the functions that apply another function to each and every elements of a 
list are bad (like "reduce", "map", "filter") ?

Francis Girard

Le lundi 7 Février 2005 19:25, Steven Bethard a écrit :
> Francis Girard wrote:
> > I'm very sorry that there is no good use case for the "reduce" function
> > in Python, like Peter Otten pretends. That's an otherwise very useful
> > tool for many use cases. At least on paper.
>
> Clarity aside[1], can you give an example of where reduce is as
> efficient as the eqivalent loop in Python?
>
> Steve
>
> [1] I generally find most reduce solutions much harder to read, but
> we'll set aside my personal limitations for the moment. ;)




More information about the Python-list mailing list