PEP318

Robin Becker robin at reportlab.com
Thu Aug 12 19:48:41 CEST 2004


David Eppstein wrote:
> 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?
> 

I think I'm with Arthur in that the current transformation notation is sufficient.

If people wish to avoid three names then we need proper anonymous functions as 
others stated.

To avoid lots of extra parentheses we need a function call composition mechanism 
or for people to define the functions they need rather than have arbitrary lists 
of operators.
-- 
Robin Becker



More information about the Python-list mailing list