[Python-checkins] r43259 - peps/trunk/pep-0008.txt

guido.van.rossum python-checkins at python.org
Thu Mar 23 19:56:46 CET 2006


Author: guido.van.rossum
Date: Thu Mar 23 19:56:43 2006
New Revision: 43259

Modified:
   peps/trunk/pep-0008.txt
Log:
Fix an inconsistency about whether 'cls' is preferred or not.


Modified: peps/trunk/pep-0008.txt
==============================================================================
--- peps/trunk/pep-0008.txt	(original)
+++ peps/trunk/pep-0008.txt	Thu Mar 23 19:56:43 2006
@@ -573,8 +573,10 @@
 
       - 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.
 


More information about the Python-checkins mailing list