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

Jack Diederich jack@performancedrivers.com
Sun, 20 Apr 2003 10:22:46 -0400

On Sun, Apr 20, 2003 at 10:00:22AM -0400, Aahz wrote:
> On Sun, Apr 20, 2003, Raymond Hettinger wrote:
> >
> > __builtin__ is already too fat.  math is for floats.  operator is mostly
> > for operators.  Perhaps make a separate module for vector-to-scalar 
> > operations like min, max, product, average, moment, and dotproduct.
> Call it "statistics".  Yes, I've seen the comments about using add()/sum()
> for strings, but I think numeric usage will be by far the most common.
> I also think that max() and min() should be removed from the builtins.
> Having a good, simple statistics library standard would be a Good Thing.

Would operations performed on sets go in there too, like combinatorics[1] that
are also frequently golfed on c.l.py?

I'm also not sure that add() means '+' or 'plus' to everyday people.
I read strvar += 'foo' as concatenate or 'plus' at a stretch but not 'add'.


[1] my 'probstat' module does these in C for lists/tuples.  probstat.sf.net