[Python-Dev] method decorators (PEP 318)
Charles Cazabon
python at discworld.dyndns.org
Fri Mar 26 13:58:21 EST 2004
Guido van Rossum <guido at python.org> wrote:
> >
> > foobar:
> > author = "Guido van Rossum"
> > deprecated = True
> > def foobar(self, arg):
> > pass
>
> The current parser can't deal with "NAME ':'" as a syntax rule,
> because expressions also start with NAME.
>
> I also don't like that you have to repeat the function name.
>
> And this would hide the "important" decorators (e.g. classmethod)
> amongst a large collection of metadata (unless you want to combine
> this with the "def foo [classmethod] (cls, a, b, c):" syntax.
def foobar(self, arg):
.classmethod
.deprecated = True
.author = "Guido van Rossum"
pass
?
Charles
--
-----------------------------------------------------------------------
Charles Cazabon <python at discworld.dyndns.org>
GPL'ed software available at: http://www.qcc.ca/~charlesc/software/
-----------------------------------------------------------------------
More information about the Python-Dev
mailing list