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

Peter Norvig pnorvig at google.com
Thu Apr 1 00:00:55 EST 2004


I have to say I favor the "last before colon" approach, but if it has to be before the def, then I think it should have a keyword, and if you don't want to introduce a new keyword, then it looks like "is" is the only reasonable candidate. And if you do have a keyword, you don't need the square brackets. So you have

is: classmethod def f(x): pass

is: author("Guido"), signature(int, result=None) def g(x): pass



More information about the Python-Dev mailing list