293: In opposition to Drew's complaints about "cls", PEP8 suggests
using "cls" as the name for variables representing classes:
- 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. (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.)
And "requires" it for classmethods:
Always use 'cls' for the first argument to class methods.
(Sorry Drew!)
I honestly had no idea that was in the pep8 doc. So, I'll rescind my
comments on 'cls'. 'klass' and friends have to go though :)
-Drew
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss