PEP318

David Eppstein eppstein at ics.uci.edu
Thu Aug 12 19:35:02 CEST 2004


In article <7ttmh0t8c3cogtbhhnp1ohqu8b51pda461 at 4ax.com>,
 Arthur <ajsiegel at optonline.com> wrote:

> foo=staticmathed(foo).
> 
> That is the universal langauge for transformations.  And when we try
> to explain to anybody what it is that @decorator means, we go back to
> the pseudo code that is in fact the existing syntax.
> 
> I guess I am mystified what it is that is perceived to have been
> gained ... by moving magic outside the function block to the top of a
> function in lieu of expressive code outside the function block at the
> bottom of the function.

Not having to write the function name three times?  If it's just foo, 
that would be one thing, but have you seen the PyObjC examples?

Also, it's not in the Zen of Python, but maybe declarative is better 
than imperative?

-- 
David Eppstein
Computer Science Dept., Univ. of California, Irvine
http://www.ics.uci.edu/~eppstein/



More information about the Python-list mailing list