[Python-ideas] Module name [was Re: Pre-PEP: adding a statistics module to Python]
M.-A. Lemburg
mal at egenix.com
Tue Aug 6 17:36:19 CEST 2013
On 06.08.2013 17:18, Antoine Pitrou wrote:
> Le Tue, 06 Aug 2013 17:12:33 +0200,
> "M.-A. Lemburg" <mal at egenix.com> a écrit :
>
>> On 06.08.2013 16:23, Antoine Pitrou wrote:
>>> Le Tue, 06 Aug 2013 16:19:18 +0200,
>>> "M.-A. Lemburg" <mal at egenix.com> a écrit :
>>>
>>>> On 06.08.2013 15:55, Antoine Pitrou wrote:
>>>>> Le Tue, 06 Aug 2013 15:46:00 +0200,
>>>>> "M.-A. Lemburg" <mal at egenix.com> a écrit :
>>>>>>
>>>>>> Python has grown a lot since the days most of the stdlib
>>>>>> modules/packages were added, so we have to pay more attention
>>>>>> to name clashes.
>>>>>
>>>>> Of course we can pay attention to name clashes. This is done
>>>>> through checking at PyPI, though, not by speculating that someone
>>>>> may think "finance" when they encounter the word "futures".
>>>>
>>>> True.
>>>>
>>>> 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")
>>
>> Sure. I was thinking of the more exotic "futures" or often used
>> terms such as "request" that can benefit from added context.
>
> In that case, compound / abbreviated names can also be used ("urllib",
> "httpreq"...). They also avoid the collision threat nicely.
I think the world has changed since the days of 8.3 DOS names :-)
The typing argument is not all that important anymore
when editors and interactive tools like ipython take care
of most of the typing for you via auto completion.
Nowadays, code readability takes precedent and so we can
use the luxury of names that tell a story, rather than
play rot13 on your brain :-)
That doesn't mean we need to go all java about names, but
we also don't have to revert to "req" when we really mean
"request".
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Aug 06 2013)
>>> Python Projects, Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-ideas
mailing list