From d9909922de1877c0abb4267c73f98969aa761746 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 23 Mar 2006 18:56:43 +0000 Subject: [PATCH] Fix an inconsistency about whether 'cls' is preferred or not. --- pep-0008.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pep-0008.txt b/pep-0008.txt index 2e659109c..c4ff7741f 100644 --- a/pep-0008.txt +++ b/pep-0008.txt @@ -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.