RELEASED Python 2.4, alpha 2

Peter Hansen peter at engcorp.com
Fri Aug 6 14:05:15 CEST 2004


Ivan Voras wrote:

> def @synchronized @classmethod x(self):
>     pass
> 
> Granted that the keywords are long-ish, but I stongly feel it's still 
> less ugly than the topmost version.

I don't think the decorator names are ever keywords.  They are
just arbitrary names bound to stuff... I suspect you would find
people writing code like this instead:

sync = synchronized
cm = classmethod

def @sync @cm x(self):
    pass


(I'm not saying whether that's a good thing, just pointing it out.)

-Peter



More information about the Python-list mailing list