Updated the rules for package names and module names, clarifying the use of

underscores.
This commit is contained in:
Barry Warsaw 2007-01-05 14:03:42 +00:00
parent 6f45f8aaa7
commit 4226413f7b
1 changed files with 5 additions and 5 deletions

View File

@ -468,9 +468,12 @@ Naming Conventions
In some fonts, these characters are indistinguishable from the numerals
one and zero. When tempted to use `l', use `L' instead.
Module Names
Package and Module Names
Modules should have short, lowercase names, without underscores.
Modules should have short, all-lowercase names. Underscores can be used
in the module name if it improves readability. Python packages should
also have short, all-lowercase names, although the use of underscores is
discouraged.
Since module names are mapped to file names, and some file systems are
case insensitive and truncate long names, it is important that module
@ -482,9 +485,6 @@ Naming Conventions
module that provides a higher level (e.g. more object oriented)
interface, the C/C++ module has a leading underscore (e.g. _socket).
Like modules, Python packages should have short, all-lowercase names,
without underscores.
Class Names
Almost without exception, class names use the CapWords convention.