diff --git a/pep-0008.txt b/pep-0008.txt index c9cd1b6c0..9983c34b8 100644 --- a/pep-0008.txt +++ b/pep-0008.txt @@ -580,6 +580,12 @@ the currently recommended naming standards. New modules and packages standards, but where an existing library has a different style, internal consistency is preferred. +Overriding Principle +-------------------- + +Names that are visible to the user as public parts of the API should +follow conventions that reflect usage rather than implementation. + Descriptive: Naming Styles -------------------------- @@ -676,8 +682,14 @@ interface, the C/C++ module has a leading underscore Class Names ~~~~~~~~~~~ -Almost without exception, class names use the CapWords convention. -Classes for internal use have a leading underscore in addition. +Class names should normally use the CapWords convention. + +The naming convention for functions may be used instead in cases where +the interface is documented and used primarily as a callable. + +Note that there is a separate convention for builtin names: most builtin +names are single words (or two words run together), with the CapWords +convention used only for exception names and builtin constants. Exception Names ~~~~~~~~~~~~~~~