[Python-ideas] Module name [was Re: Pre-PEP: adding a statistics module to Python]

Ryan rymg19 at gmail.com
Wed Aug 7 03:47:52 CEST 2013


I say statistics. That doesn't really fit overly well in math, and statslib sounds C-ish.

Steven D'Aprano <steve at pearwood.info> wrote:

>On 07/08/13 00:33, Nick Coghlan wrote:
>> On 7 August 2013 00:23, Antoine Pitrou <solipsis at pitrou.net> wrote:
>>> Le Tue, 06 Aug 2013 16:19:18 +0200,
>>> "M.-A. Lemburg" <mal at egenix.com> a écrit :
>[...]
>>>> Apart from avoiding name clashes, I think adding a bit of extra
>>>> context by means of placing the module into package also helps
>people
>>>> trying to determine the meaning of the module.
>>>
>>> Well, "statistics" sounds clear enough to me :-)
>>> (like "logging" or "unittest")
>>
>> Yeah, Steven's own stats module on PyPI is the main name clash we
>need
>> to avoid, and "statistics" handles that nicely. The other nice thing
>> about using the top level name is that converting math to a package
>> would be a pain, so +1 for the simple option :)
>
>
>On the other hand, moving math to a package would lower the barrier to
>adding new functions to it in the future.
>
>Wouldn't these two steps be sufficient to make math a package?
>
>1. Move math.cpython-34.so to _math.cpython-34.so
>
>2. Add math/__init__.py containing a single line "from _math import *"
>
>
>As far as the name goes, to cut back on bike-shedding, I'm going to
>rule out any names other than these three:
>
>1) statistics
>2) statslib
>3) math.stats
>
>
>Top-level "stats" is ruled out because of possibility of confusion with
>"stat".
>
>My preference is math.stats because it allows the expansion of math.
>Others may consider that a disadvantage.
>
>Thoughts?
>
>
>
>
>-- 
>Steven
>_______________________________________________
>Python-ideas mailing list
>Python-ideas at python.org
>http://mail.python.org/mailman/listinfo/python-ideas

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130806/afc9ca54/attachment.html>


More information about the Python-ideas mailing list