Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #38091

Re: CamelCase vs. all-lowercase package names

From Terry Reedy <tjreedy@udel.edu>
Subject Re: CamelCase vs. all-lowercase package names
Date 2013-02-02 18:05 -0500
References <CAM04Upt0HSYD5heSqACyfHZKYQ=CbobDEdQ5Zm-2St2qjUrcZA@mail.gmail.com> <87d2wjm9ba.fsf@handshake.de>
Newsgroups comp.lang.python
Message-ID <mailman.1303.1359846358.2939.python-list@python.org> (permalink)

Show all headers | View raw


On 2/2/2013 3:03 AM, dieter wrote:
> Rhubarb Sin <rhubarbsin@gmail.com> writes:
>
>> PEP-8 calls for "short, all-lowercase names" for packages:
>>
>> http://www.python.org/dev/peps/pep-0008/#package-and-module-names
>
> This is mainly to support case insensitive file systems (and
> file systems with quite limited path length).

It also serves to differentiate a module from the main class it defines.
If file Module defines class Module, then the two possible imports
import Module
from Module import Module
make 'Module' later in the file ambiguous without referring to the top 
of the file for the import. But now, 'decimal' is the module and 
'Decimal' is the class (absent stupid renaming designed to confuse).

> With mixed case, some packages/modules may not conflict on
> a case sensitive file system but happen to conflict on a
> case insensitive file system.

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: CamelCase vs. all-lowercase package names Terry Reedy <tjreedy@udel.edu> - 2013-02-02 18:05 -0500

csiph-web