> Dobře, tohle mě zajímá: Jakou alternativu nabízí Python k 
> foldl (které si přejmenoval na "reduce")? U map je to jasné, 
> přeci jen list comprehension ani generator expression nejsou 
> o moc horší, navíc generator expression má lazy sémantiku, 
> což je Good Thing(TN). Ale u toho reduce() trošku tápu.

Taky jsem tápal, ale GvR mi to objasnil na zmíněné stránce:
http://www.artima.com/weblogs/viewpost.jsp?thread=98196

So now reduce(). This is actually the one I've always hated most, because,
apart from a few examples involving + or *, almost every time I see a
reduce() call with a non-trivial function argument, I need to grab pen and
paper to diagram what's actually being fed into that function before I
understand what the reduce() is supposed to do. 

Zrušením reduce() GvR chrání americké lesy.
Jan Matějka

_______________________________________________
Python mailing list
Python@py.cz
http://www.py.cz/mailman/listinfo/python

Odpovedet emailem