PEP318: radical notion

Arien Malec arien.malec at gmail.com
Tue Aug 24 18:13:01 EDT 2004


Christophe Cavalaria <chris.cavalaria at free.fr> wrote in message news:<412a4222$0$293$626a14ce at news.free.fr>...
> Arien Malec wrote:

> > 1) Make PEP318 *only* implement problem (1). That is, create sematics for
> > defining and retrieving function/method/class metadata
> > 2) Create a new default metaclass that uses metadata for class/static
> > method definitions to perform the necessary class/staticmethod
> > transformations. Perhaps use this metaclass as default in 2.4 only via a
> > "from __future__ import foo".
> > 3) Leave any arbitrary transformations to be implemented via custom
> > metaclasses -- these metaclasses will have access to the custom metadata
> > to trigger method def transformations.

> Unfortunately for you, you can use decorators on normal functions and not
> only on member functions. It rules out any metaclass based implementation.

Is there a valid use case that supports arbitrary magical non-metadata
transformations of standalone functions?

Arien



More information about the Python-list mailing list