[Python-ideas] Pre-PEP: adding a statistics module to Python

Ronald Oussoren ronaldoussoren at mac.com
Mon Aug 5 07:55:26 CEST 2013


On 4 Aug, 2013, at 3:51, Steven D'Aprano <steve at pearwood.info> wrote:

> On 04/08/13 05:47, Alexander Belopolsky wrote:
> 
>> The PEP does not mention statistics.sum(), but the reference implementation
>> includes it.  I am not sure stdlib needs the third sum function after
>> builtins.sum and math.fsum.  I think it will be better to improve
>> builtins.sum instead.
> 
> 
> I don't know enough C to volunteer to do that. If the built-in sum() is improved to the point it passes my unit tests, I would consider using it in the future.

Does math.fsum pass your tests? From the description and references to the cookbook it seems that your sum is functionally equivalent to math.fsum.

Ronald


More information about the Python-ideas mailing list