Fix an inconsistency about whether 'cls' is preferred or not.

This commit is contained in:
Guido van Rossum 2006-03-23 18:56:43 +00:00
parent a0fc801a49
commit d9909922de
1 changed files with 4 additions and 2 deletions

View File

@ -573,8 +573,10 @@ Naming Conventions
- If your public attribute name collides with a reserved keyword, append
a single trailing underscore to your attribute name. This is
preferable to an abbreviation or corrupted spelling. E.g. "class_"
is preferable to "cls" or "klass".
preferable to an abbreviation or corrupted spelling. (However,
notwithstanding this rule, 'cls' is the preferred spelling for any
variable or argument which is known to be a class, especially the
first argument to a class method.)
Note 1: See the argument name recommendation above for class methods.