[Python-Dev] Fwd: summing a bunch of numbers (or "whatevers")

Alex Martelli aleax@aleax.it
Sun, 20 Apr 2003 10:01:12 +0200

On Sunday 20 April 2003 09:51 am, Prabhu Ramachandran wrote:

VERY good summary -- repeated here:

> Pros:
>   1. One obvious, fairly efficient, and easy way to sum sequences.
>   2. Google and experience suggest sum is used more often than
>   product and other functions.
>   3. Easy on newbies?
>   4. Will hopefully prevent the N+1'th thread on how to sum lists on
>   c.l.py.
> Cons:
>   1. __builtins__ is already fat.  Will one more function make that
>   much difference?
>   2. Will future requests be made for product and friends?
>   3. Why not simply speed up reduce/operator.add and train more people
>   to use that?

I think Pro #2 answers Con #2, and dittos for #3's (in addition to some
implementation issues with speeding up reduce that way).  But anyway,
yes, these _are_ the considerations made pro & con on this thread.

Anyway, whence now -- a PEP?  (Seems a bit too small for that).  Or, do
I just submit the patch (to where -- builtins?) and let Guido pronounce?