question on list comprehensions

Alex Martelli aleaxit at yahoo.com
Fri Oct 15 03:04:53 EDT 2004


Frohnhofer, James <james.frohnhofer at csfb.com> wrote:
   ...
>       map(lambda tup: reduce(lambda x,y:x+y,tup),

Changing this line to
        map(sum,
will be WAY faster.  That 'reduce' is a real performance drag.


Alex



More information about the Python-list mailing list