[Python-Dev] Re: PEP 318: Decorators last before colon (original) (raw)

Mark Russell marktrussell at btopenworld.com
Wed Mar 31 15:31:56 EST 2004


On Wed, 2004-03-31 at 20:20, Guido van Rossum wrote:

> I suggest that the the break-less solution > > [classmethod, logged, debug] def function(args):

Sorry, can't do that with the current parser.

Actually I think that's a good thing - it forces everyone to format things the same way. I was a fan of the "def foo() [decorator]" syntax but I've changed my mind - this way has several things going for it:

- Simple implementation
- More or less forces one style of code layout
- Doesn't break tools that look for "def foo(" type patterns

` - Short-circuits the endless syntax discussion :-)

Mark Russell



More information about the Python-Dev mailing list