[Python-Dev] Yet Another Decorator Syntax Suggestion (YADSS)

Robert Brewer fumanchu at amor.org
Mon Mar 29 12:45:24 EST 2004


Mike Thompson wrote:
> I propose that the 'as' keyword be used together with whitespace 
> indentation before the 'def' to *optionally* decorate the 
> def, something like this:
> 
>      as:
>          classmethod
>      def func(arg):
>          pass
> 
> Damn. I just re-read PEP-318 and found it included a syntax 
> similar to 
> that which I propose. Something from Quixote which uses 
> 'using' where I have used 'as'.

I've been +1 on this solution (or a variant of it ;) for some time now.
>From a readability standpoint, I think it wins hands-down. Until someone
demonstrates it's technically impossible... <wink> it gets my vote. I'd
want something other than 'as', however. Crazy thought: how about
'decorator'?


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org



More information about the Python-Dev mailing list