[Python-Dev] Yet Another Decorator Syntax Suggestion (YADSS) (original) (raw)
Robert Brewer fumanchu at amor.org
Mon Mar 29 12:45:24 EST 2004
- Previous message: [Python-Dev] Yet Another Decorator Syntax Suggestion (YADSS)
- Next message: [Python-Dev] OpenVMS file system and UNIVERSAL_NEWLINES support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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... 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
- Previous message: [Python-Dev] Yet Another Decorator Syntax Suggestion (YADSS)
- Next message: [Python-Dev] OpenVMS file system and UNIVERSAL_NEWLINES support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]