[Python-ideas] Simpler Customization of Class Creation - PEP 487

Michael Selik mike at selik.org
Tue Feb 9 04:54:27 EST 2016


On Tue, Feb 9, 2016, 2:44 AM Martin Teichmann <lkb.teichmann at gmail.com>
wrote:

> > This new ProvisionalMeta will allow multiple inheritance of metaclasses
> > using standard left-to-right priority (or the MRO for more depth). In the
> > case of two metaclasses, the code from Left will run immediately after
> the
> > class is created and the code from Right will go next. Right? (joking. I
> > should say "Correct?")
>
> No. The upshot is: metaclasses are complicated, especially if you want
> to combine two of them. But most uses of the usecases fall into one of
> the three mentioned categories. So we just write one metaclass that
> serves those use cases, everyone can simply use the very same metaclass,
> so the are no conflicts anymore as there *is* only one metaclass.
> Eventually,
> this one metaclass shall become the builtin type, and so we don't need
> metaclasses anymore in most usecases.
>

Gotcha. I misread the PEP.

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20160209/96577f71/attachment.html>


More information about the Python-ideas mailing list