def ... decorate
rnd at onego.ru
Fri Aug 13 19:30:33 CEST 2004
On Sat, 14 Aug 2004, Anthony Baxter wrote:
>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'"
Probably egrep '(def|from)' could save you...
>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
Sincerely yours, Roman Suzi
rnd at onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
More information about the Python-list