[Python-ideas] statistics.sum [was Re: Pre-PEP: adding a statistics module to Python]

Ronald Oussoren ronaldoussoren at mac.com
Thu Aug 8 10:52:58 CEST 2013


On 5 Aug, 2013, at 22:04, Steven D'Aprano <steve at pearwood.info> wrote:
> 
> 
> Show of hands please, +1 or -1 on statistics.sum.

-1, it would be better to change one of the other sum functions (either math.fsum should work with non-floats, or builtins.sum should do the right thing with floats).  It's confusing to have multiple functions that do more or less the same thing, and more so when the reason for having multiple versions is due to complexity in the semantics of floating point numbers. 

Ronald



More information about the Python-ideas mailing list