<p dir="ltr">OK, I see this point now. Still looking for time to review the rest of your PEP!</p>
<p dir="ltr">--Guido (mobile)</p>
<div class="gmail_quote">On Jul 3, 2016 3:29 PM, "Martin Teichmann" <<a href="mailto:lkb.teichmann@gmail.com">lkb.teichmann@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Guido,<br>
<br>
sorry I missed your post...<br>
<br>
>> One of the big issues that makes library authors reluctant to use<br>
>> metaclasses<br>
>> (even when they would be appropriate) is the risk of metaclass conflicts.<br>
><br>
> Really? I've written and reviewed a lot of metaclasses and this has never<br>
> worried me. The problem is limited to multiple inheritance, right? I worry a<br>
> lot about MI being imposed on classes that weren't written with MI in mind,<br>
> but I've never particularly worried about the special case of metaclasses.<br>
<br>
Yes, the problem only arises with MI. Unfortunately, that's not<br>
uncommon: if you want to implement an ABC with a class from a<br>
framework which uses metaclasses, you have a metaclass conflict. So<br>
then you start making MyFrameworkABCMeta-classes.<br>
<br>
The worst is if you already have a framework with users out there. No<br>
way you add a metaclass to your class, however convenient it would<br>
be. Because you never now if some user out there had gotten the idea<br>
to implement an ABC with it. Sure, you could let your metaclass<br>
inherit from ABCMeta, but is this really how it should be done?<br>
<br>
(This has already been mentioned by others over at python-ideas:<br>
<a href="https://mail.python.org/pipermail/python-ideas/2016-February/038506.html" rel="noreferrer" target="_blank">https://mail.python.org/pipermail/python-ideas/2016-February/038506.html</a>)<br>
<br>
Greetings<br>
<br>
Martin<br>
_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/guido%40python.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/guido%40python.org</a><br>
</blockquote></div>