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

Joshua Landau joshua at landau.ws
Mon Aug 5 02:38:39 CEST 2013


On 5 August 2013 00:28, Ethan Furman <ethan at stoneleaf.us> wrote:

> On 08/04/2013 03:51 PM, Joshua Landau wrote:
>
>>
>>  Coincidentally, that's the same difference I immediately come up
>>> with for sum and statistics.sum -- "statistics.sum must have
>>>  something do to with statistics"; and I would never think about
>>> it again unless I had a problem with statistics.
>>>
>>
>> That's not really true -- statistics.sum is better named
>>  statistics.precise_sum. It's not only useful when doing statistics.
>>
>
> That may be, but it is in the statistics module, so I'm not going to
> think of it unless I'm doing something requiring statistics.


That's mostly true and part of the justification for my proposal of putting
this under "math". Statistics is a branch of math and often when you need
precise numerical results you'd think of the math module even if you didn't
firstly think you were doing statistics.


 I tend to think of it this way: the name should make it clear when
>> you should read the documentation. gzip.open is  obvious; you should
>>  read it when you work with gzip files. statistics.sum is not because
>> *all* sums are statistical sums.
>>
>
> Apparently you know more about stats than I do.  I must admit I'm curious
> how the sum 10 is statistical (to make it interesting we can say it's the
> value of the dollars I have in my pocket).  At any rate, you can see that
> I, at least, would read the docs to see what statistics.sum would do.


Á la wikipedia, "Statistics is the study of the collection, organization,
analysis, interpretation and presentation of data". Hence a summation is
statistical, irrelevant of the specifics. It's just pedantry by this point
but I was trying to confer the idea that it's not clear cut when someone is
doing "statistics" if you're really just using sum.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130805/7ae01719/attachment.html>


More information about the Python-ideas mailing list