[Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

Jim Jewett jimjjewett at gmail.com
Tue May 1 01:29:30 CEST 2007

On 4/30/07, Phillip J. Eby <pje at telecommunity.com> wrote:

> It is currently an open issue to determine the best way to implement
> this rule in Python 3.0.  Under Python 2.x, a class' metaclass was
> not chosen until the end of the class body, which means that
> decorators could insert a custom metaclass to do processing of this
> sort.  (This is how RuleDispatch, for example, implements the implicit
> class rule.)

> PEP 3115, however, requires that a class' metaclass be determined
> *before* the class body has executed, making it impossible to use this
> technique for class decoration any more.

It doesn't say what that metaclass has to do, though.

Is there any reason the metaclass couldn't delegate differently
depending on the value of __my_magic_attribute__ ?


More information about the Python-3000 mailing list