PEP318: radical notion
Arien Malec
arien_malec at yahoo.com.REMOVE
Tue Aug 24 20:26:47 EDT 2004
Christophe Cavalaria <chris.cavalaria at free.fr> wrote in
news:412bc7e6$0$4065$626a14ce at news.free.fr:
> Arien Malec wrote:
>> Is there a valid use case that supports arbitrary magical
>> non-metadata transformations of standalone functions?
>
> memoize for example. No metadata, only transformation, doesn't really
> apply to a member function in fact ( although it might be possible à
Classically, memoize is implemented as function composition, or as a true
GoF decorator. It's not clear (to me, at least) how much benefit the
syntactic sugar gets you.
> Why is it that there are always some people who doesn't understand all
> the possibilities of decorators and so want to minimise their
> usefulness ?
I dunno. Who are those people? My objection to PEP318 is that makes
something that's really powerful (arbitrary transformation) look like a
trivial declaration. In Common Lisp, for instance, a defmacro form hints
that powerful mojo is being performed; the same is not apparent in
PEP318.
Arien
More information about the Python-list
mailing list