Re: How sum() should really be done
Douglas Alan wrote:
[color=blue]
> 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.[/color]
reduce can't, since reduce doesn't require the function passed to be
operator.add.
--
Erik Max Francis && max@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
Douglas Alan wrote:
[color=blue]
> 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.[/color]
reduce can't, since reduce doesn't require the function passed to be
operator.add.
--
Erik Max Francis && max@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
Comment