J2 decorator grammar

François Pinard pinard at iro.umontreal.ca
Mon Aug 23 12:44:45 EDT 2004


[Peter Maas]
> Robert Brewer schrieb:

> with:
>     return ...
>     accept ...
>     classmethod
> def func():
>     <function body>

> "using" instead of "with" would be equally satisfactory for me. I
> don't like "decorate" because it sounds like "attaching some bells
> and whistles" or "making it look pretty" which isn't adequate for the
> meaning of this syntax.

I'm not especially crusading for `with', but it has the advantage that it will
likely become a keyword in some later version of Python, and likely also,
will be used in `with SOMETHING:' and not barely as `with:'.

Reserving a keyword is a lengthy process, like it was demonstrated by the
progressive implementation of `yield'.  So using `with' here would be a
nice investment for the future in that regard.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard



More information about the Python-list mailing list