python style guide inconsistencies

"Martin v. Löwis" martin at v.loewis.de
Sun Apr 22 15:58:39 EDT 2007


Darren Dale schrieb:
> I was just searching for some guidance on how to name packages and modules,
> and discovered some inconsistencies on the www.python.org.
> http://www.python.org/doc/essays/styleguide.html says "Module names can be
> either MixedCase or lowercase." That page also refers to PEP 8 at
> http://www.python.org/dev/peps/pep-0008/, which says "Modules should have
> short, all-lowercase names. ... Python packages should also have short,
> all-lowercase names ...".
> 
> Which is most up to date? Is this the right place to point out that one of
> those pages needs to be updated?

No - this is better discussed on python-dev.

In any case, there isn't technically a contradiction. Module names
MUST be either MixedCase or lowercase; they SHOULD be lowercase.

So unfortunately, for tradition, some module names are mixed case
(such as ConfigParser or StringIO). I can personally accept that as
a necessary evil, although I would prefer if all modules were
lower case.

Martin



More information about the Python-list mailing list