compromise? keywords for static/class, move decorators to top of function

Michael Ekstrand python at
Fri Aug 6 20:15:52 CEST 2004

On Friday 06 August 2004 12:54, Doug Holton wrote:
> I propose (and others have) that built-in features have keyword
> support, like static and class methods.  Also, I believe it is more
> readable if decorators, especially longer ones, are moved to the top
> of the function body, just like docstrings, instead of coming before
> the function is even declared.  Whether you use @ or [] is still
> open.
> def classmethod getratio (arg1, arg2):
>      @accepts(int,int)
>      @returns(float)
>      ...

Ooh... I like, I like...

This seems to be the most reasonable, readable proposition I've seen so 
far. And I'd favor @ for this - it makes it clear that this is 
"something different".


More information about the Python-list mailing list