Decorator keyword options - brainstorming

Peter Hansen peter at engcorp.com
Fri Aug 20 12:10:53 EDT 2004


David Vaughan wrote:

> The guys at python-dev won't be expecting that one :)
> But seriously, there must be something literally pythonic we could
> propose.

I believe that would be any of the options involving a
simple sequence of callables, which would be applied in order
from start to finish (just as any Python programmer would
expect).  This was shot down for various reasons pretty early
on, whether in the "list-after-def" form or the others.

I think the "decorate:" option (with alternative keyword if
there's a better) is the second most Pythonic shown to date...

Most of the others are far too convoluted, or use such an
uncommon (to Python) style of syntax, that the term "Pythonic"
cannot yet be applied to them... but maybe after it's in the
language the definition of the term will change. ;-)

-Peter



More information about the Python-list mailing list