#6 'cls' deserves pseudo-keyword status, same as 'self'

open
nobody
None
5
2014-07-11
2005-10-04
szplug
No

It's a quick and easy addition, but, 'cls' should be a
pseudo-keyword too since it is the convention for the
class argument for class methods, like 'self' is the
convention for the instance argument with instance
methods. Eg,

class Foo(object):
def summat(cls, x):
.....
summat = classmethod(summat)

....

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks