PEP 318 - Function Modifier Syntax

Ulrich Petri ulope at
Tue Jun 10 01:00:29 CEST 2003

"Roman Suzi" <rnd at> schrieb im Newsbeitrag
news:mailman.1055178919.28798.python-list at
> On 9 Jun 2003, Kevin Smith wrote:
> >This is the first draft of a PEP describing new syntax for applying
> >function modifiers (e.g. classmethod, staticmethod, etc).  There is
> >currently no implementation of the proposed syntax (I have heard rumors
> >that the 'def foo(self) [...]' syntax has a patch somewhere, but I
> >haven't seen it yet).  I have already received a few comments and will
> >revise the document soon.  The latest version will always be available
> >at
> >
> >
> >        def classmethod foo(self):
> >            perform method operation
> oh no... I hope Python will not be another Java. I think current

The proposed syntax was (though its not easy to comprehend from the PEP)

def foo(spam) as classmethod:

Ciao Ulrich

More information about the Python-list mailing list