Python Tutorial Was: Guido's regrets: filter and map

Skip Montanaro skip at pobox.com
Tue Nov 26 13:55:39 EST 2002


    Grant> I see how you use list comprehensions to replace map and filter,
    Grant> but I don't understand why list comprehensions are touted as a
    Grant> replacement for reduce and lambda.  

In general, I don't think they are (though people make mistakes or aren't as
precise as they ought to be at times).  Map, filter, reduce and lambda get
lumped together in the "functional programming" pot.  List comprehensions
only replace map and filter.

-- 
Skip Montanaro - skip at pobox.com
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list