<div dir="ltr"><div>While PEP422 is somewhat useful for heavy users of metaclasses (actually not necessarily so heavy; as mentioned in the thread you'll hit the problem as soon as you want to make e.g. a QObject also instance of another metaclass), I don't like it too much because it feels really ad hoc (adding yet another layer to the already complex class initialization machinery), whereas dynamically creating the sub-metaclass (inheriting from all the required classes) seems to be the "right" solution. In a sense, using an explicit and ad hoc mixer ("__add__") would be like saying that every class should know when it is part of a multiple inheritance chain, whereas the implicit ("multi_meta") mixer just relies on Python's MRO to do the right thing. Of course, best would be that the "multi_meta" step be directly implemented at the language level, and I agree that having to add it manually isn't too beautiful.</div><div><br></div><div>__init_class__ could then simply be implemented as part of a normal metaclass, from which you could inherit without worrying about other metaclasses.</div><div><br></div><div>Antony</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-13 5:27 GMT-08:00 Martin Teichmann <span dir="ltr"><<a href="mailto:lkb.teichmann@gmail.com" target="_blank">lkb.teichmann@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
me too, I missed that PEP, and yes, it would certainly work<br>
for all my needs.<br>
<br>
In short words, the PEP reads: forget all that metaclass stuff,<br>
here comes the real solution. Maybe we can even abandon<br>
metaclasses altogether in Python 4, I think noone would shed<br>
a tear over them.<br>
<br>
But if the metaclass fans should win the battle, I would like<br>
my proposal included sometimes.<br>
<br>
Greetings<br>
<span class="HOEnZb"><font color="#888888"><br>
Martin<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</div></div></blockquote></div><br></div>