At 07:29 PM 4/30/2007 -0400, Jim Jewett wrote:
>On 4/30/07, Phillip J. Eby <[EMAIL PROTECTED]> 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__ ?

Sure -- that's what I suggested in the "super(), class decorators, and PEP 
3115" thread, but Guido voted -1 on adding such a magic attribute to PEP 
3115.  (Actually, I think he -1'd *any* change to 3115 to support this 
feature.)

_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to