Another Language Change for Debate
Thomas Heller
thomas.heller at ion-tof.com
Tue Jan 15 07:32:00 EST 2002
"Alex Martelli" <aleax at aleax.it> wrote in message news:ldK%7.5660$sW5.205505 at news2.tin.it...
> 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?
>
> Playing devil's advocate:
>
> class sic(object):
> def sic.aclassmethod(): pass
> def self.anormalmethod(): pass
>
> Isn't this better than the current
>
> class sic(object):
> def aclassmethod(klass): pass
> aclassmethod = classmethod(aclassmethod)
> def anormalmethod(self): pass
>
I prefer to write classmethods in this way, but maybe I'm just weird ;-)
(and I don't use staticmethods)
class sic(object):
class __metaclass__(type):
def aclassmethods(self): pass
def anormalmethod(self): pass
Thomas
More information about the Python-list
mailing list