FEEDBACK WANTED: Type/class unification

Andrew Dalke dalke at acm.org
Tue Jul 31 07:50:38 EDT 2001


Hernan M. Foffani <hfoffani at yahoo.com> wrote:
> One minor suggestion:
> I think it would help if you set a convention for the name
> of the first argument in classmethods. Like self for standard
> methods. Well, even self can "work" here, too.

Guido:
>I think 'self' would be confusing.  I'd like to propose 'cls'.

What's wrong with 'klass'?  Other than that it looks either
like a typo or like German.  Several of the standard libraries
use 'klass' when refering to a class and I've seen code outside
the std. library using 'klass' as well.  Whereas 'cls' is less
frequently used in the std. library to hold a class, but I've
not seen external uses of that name for that purpose elsewhere.

To me, 'cls' means "clear screen" despite the fact I haven't
worked in DOS for almost 10 years :)  Also, "klass" has an
obvious pronounciation, and "cls" can be used as a list of
"cl"s.

                    Andrew
                    dalke at dalkescientific.com






More information about the Python-list mailing list