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

Eli Bendersky eliben at gmail.com
Sun Aug 4 04:00:59 CEST 2013


On Sat, Aug 3, 2013 at 12:47 PM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
>
> On Fri, Aug 2, 2013 at 1:45 PM, Steven D'Aprano <steve at pearwood.info> wrote:
>>
>> I have raised an issue on the tracker to add a statistics module to
>> Python's standard library:
>>
>> http://bugs.python.org/issue18606
>>
>> and have been asked to write a PEP. Attached is my draft PEP. Feedback is
>> requested, thanks in advance.
>
>
> 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.

While I'm somewhat -0.5 on the general idea of the statistics module
(competing with well-established, super-optimized and
by-themselves-famous numeric libraries Python has does not sound like
a worthy goal), I have to agree with Alexander w.r.t. "sum". Strongly
-1 from me on having functions with the same name as existing stdlib
functions but different functionality. This is very much unpythonic.

Eli


More information about the Python-ideas mailing list