Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: CamelCase vs. all-lowercase package names (http://www.velocityreviews.com/forums/t957222-re-camelcase-vs-all-lowercase-package-names.html)

Terry Reedy 02-02-2013 11:05 PM

Re: CamelCase vs. all-lowercase package names
 
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-0...d-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



All times are GMT. The time now is 08:32 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.