On 5/1/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> At 10:11 AM 5/1/2007 -0400, Jim Jewett wrote:
> >On 4/30/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:
> >> >On 4/30/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote:

> >> >>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.

...

> >>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.

> >I don't think we're understanding each other.

> Yup, and we're still not now.  :)  Or at least, I don't understand what the
> code below does, or more precisely, why it's different from just having a
> __decorators__ list containing direct callbacks.

That would be fine too... but I thought you were saying that you
couldn't do this at all any more, because the metaclass had to be
determined before the class, instead of inside it.

Note that it doesn't have to be any particular magic name -- just one
agreed upon by the metaclass and the class author.  Today, some such
names are semi-standardized already; you don't need language support.

Why would you suddenly start needing language support after 3115?

-jJ
_______________________________________________
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