def ... decorate
anthonybaxter at gmail.com
Fri Aug 13 18:59:07 CEST 2004
On Fri, 13 Aug 2004 20:55:39 +0400 (MSD), Roman Suzi <rnd at onego.ru> wrote:
> Just replace decorate with "from" and the nice syntax is found:
> def f:
> grammarrule('statement : expression')
> version("Added in 2.4")
> from self, p:
> """docstring here"""
> print p
I _really_ _really_ dislike re-using 'from' in this way. It's really confusing.
I also don't like the way it's splitting the argument list out like
that. It's a _big_
change from how things work today, and will break pretty much _every_
tool that works with Python source, and badly.
For instance, I often end up doing some equivalent of "grep 'def funcname'"
and like the fact that I get the start (at least) of the argument
list. More often
than not, I get the full argument list, which is what I was looking for in the
More information about the Python-list