[Python-ideas] Module name [was Re: Pre-PEP: adding a statistics module to Python]
MRAB
python at mrabarnett.plus.com
Wed Aug 7 04:18:28 CEST 2013
On 07/08/2013 02:06, Steven D'Aprano 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?
>
I'm not keen on "statslib".
More information about the Python-ideas
mailing list