Another Language Change for Debate

Matt donut at
Fri Jan 11 18:04:42 EST 2002

In article <f3baf765.0201111354.70032ecb at>, IB wrote:
> Hello, Michael:
> My 2 cents are that we have to ask one more question - what other
> benefits would there be if such syntax would be allowed?
> I would agree that it would be a neat thing, but after few minutes of
> thinking on the subject I could not come up with anything extra...

Actually, I thought up one neat thing after reading it... 

> Michael Chermside <mcherm at> wrote in message news:<mailman.1010773286.16324.python-list at>...
>> So here's my idea. Allow the following syntax:
>> class MyClass(OtherClass):
>>     def self.addItems( newItems ):
>>        self.items += newItems

After using some staticmethod() (in python2.2), it popped out at
me how support for staticmethod/classmethod could be added without
new keywords:

class MyClass:
        #instance method
    def bar(y):
    def class.baz(z):

(Of course, since this would break ALL old code, adding new
keywords would be probably be a better idea. ;)

Matthew Mueller
Noone likes spam in their email.

More information about the Python-list mailing list