How sum() should really be done

Erik Max Francis max at alcyone.com
Thu Nov 13 23:51:00 CET 2003


Douglas Alan wrote:

> Ah, that reminds me -- both sum() and reduce() can be removed from
> Python by extending operator.add so that it will take any number of
> arguments.

reduce can't, since reduce doesn't require the function passed to be
operator.add.

-- 
   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ 
\__/  The golden rule is that there are no golden rules. -- George
     Bernard Shaw




More information about the Python-list mailing list