Possible PEP: Improve classmethod/staticmethod syntax

Kevin Smith Kevin.Smith at sas.com
Thu Jun 5 14:01:19 CEST 2003

In <bbl189$fs9$1 at driftwood.ccs.carleton.ca> Sean Ross wrote:
> Personally, I would like to see something like this:
> def Frobozz() as static:
>     ...
> def eiffel(self) as contract(pre=pre, post=post):
>     ...
> def ManyFunctionAttributes() as static, contract(pre,post):
>      ...

I'd go for this one.  There is just something unpalatable about the 'def 
foo()[static]' syntax.  That's just too much unnecessary and bizarre 
syntax for Python.  But this 'as <tuple>' syntax seems to fit quite 

Kevin Smith
Kevin.Smith at sas.com

More information about the Python-list mailing list