Possible PEP: Improve classmethod/staticmethod syntax

Erik Max Francis max at alcyone.com
Fri Jun 6 00:11:28 CEST 2003

Sean Ross wrote:

> I agree with the 'unpalatable' reaction to 'def foo()[static]'. To me,
> it
> introduces unnecessary line noise. I should note that using the 'as
> <tuple>'
> form was suggested on python-dev, back in February, by (I think) Greg
> Ewing.
> (That was a very long thread.)

It got mentioned on the regular group/list as well, and I recall
approving of it then, too.  I'm ambivalent toward the def staticmethod
f() ... form, downright don't like the def f() [staticmethod] ... form
(the brackets do not seem appropriate), and quite like the def f() as
staticmethod ... form.

   Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
 __ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/  \ I love mankind; it's people I can't stand.
\__/  Charles Schultz

More information about the Python-list mailing list