<div dir="ltr">That's fair. However, the documentation should at least be repaired by replacing section 3.3.3.2 with:<div><br></div><div><span class="gmail_msg" style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif;text-align:justify">"T</span><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif">he metaclass of a class definition is selected from the explicitly specified metaclass (if any) and the metaclasses (i.e. type(cls)) of all specified base classes. The most derived metaclass is one which is a subtype of all of these candidate metaclasses. If none of the candidate metaclasses meets that criterion, then the class definition will fail with TypeError. If provided, the explicit metaclass must be a callable accepting the positional arguments (name, bases, _dict)."</span><br></div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif"><br></span></div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif">This is because something happened along the way and Objects/typeobject.c:</span><font color="#212121" face="helvetica neue, helvetica, arial, sans-serif">type_new </font><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif">no longer coincides with Lib/types.py:</span><font color="#212121" face="helvetica neue, helvetica, arial, sans-serif">new_class. The Python version conditionally calls _calculate_meta whereas the C version calls it unconditionally.</font><span class="inbox-inbox-Apple-converted-space" style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif"> </span><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif"> I consider the C implementation to be the "correct" version.</span></div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif"><br></span></div><div><span style="color:rgb(33,33,33);font-family:"helvetica neue",helvetica,arial,sans-serif">Best,</span></div><div><br></div><div><font color="#212121" face="helvetica neue, helvetica, arial, sans-serif">Neil</font></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 13, 2016 at 5:41 PM Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, Oct 13, 2016 at 01:46:34PM -0700, Neil Girdhar wrote:<br class="gmail_msg">
<br class="gmail_msg">
> If provided, the explicit metaclass must be an instance of<br class="gmail_msg">
> type()."<br class="gmail_msg">
<br class="gmail_msg">
-1 for pointless breakage.<br class="gmail_msg">
<br class="gmail_msg">
The metaclass has always been permitted to be any callable. You haven't<br class="gmail_msg">
given any good reason for gratuitously changing this.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Steve<br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
Python-ideas mailing list<br class="gmail_msg">
<a href="mailto:Python-ideas@python.org" class="gmail_msg" target="_blank">Python-ideas@python.org</a><br class="gmail_msg">
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" class="gmail_msg" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br class="gmail_msg">
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" class="gmail_msg" target="_blank">http://python.org/psf/codeofconduct/</a><br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
<br class="gmail_msg">
---<br class="gmail_msg">
You received this message because you are subscribed to a topic in the Google Groups "python-ideas" group.<br class="gmail_msg">
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/python-ideas/wrHDM0SOIqE/unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">https://groups.google.com/d/topic/python-ideas/wrHDM0SOIqE/unsubscribe</a>.<br class="gmail_msg">
To unsubscribe from this group and all its topics, send an email to <a href="mailto:python-ideas%2Bunsubscribe@googlegroups.com" class="gmail_msg" target="_blank">python-ideas+unsubscribe@googlegroups.com</a>.<br class="gmail_msg">
For more options, visit <a href="https://groups.google.com/d/optout" rel="noreferrer" class="gmail_msg" target="_blank">https://groups.google.com/d/optout</a>.<br class="gmail_msg">
</blockquote></div>