<div dir="ltr">Heh, I'm not totally surprised -- I took Python's metaclass design from a book named Putting Metaclasses to Work, by Ira R. Forman and Scott H. Danforth (<a href="https://www.amazon.com/Putting-Metaclasses-Work-Ira-Forman/dp/0201433052">https://www.amazon.com/Putting-Metaclasses-Work-Ira-Forman/dp/0201433052</a>). The book describes a custom metaclass extension to C++ supporting metaclasses, from which I took everything I could given that Python is a dynamic language (the key thing I left out was automatic synthesis of combined metaclasses when multiple inheritance sees two unrelated metaclasses). Hopefully the authors get some credit in the current C++ standard proposal.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 27, 2017 at 7:36 AM, Steve Dower <span dir="ltr"><<a href="mailto:steve.dower@python.org" target="_blank">steve.dower@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="#0563C1" vlink="#954F72" lang="EN-US"><div class="m_7482546043977821704WordSection1"><p class="MsoNormal">Thought this might be interesting for those of us who live deeper in the language than most – this is the formal proposal to add metaclasses to C++.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0707r0.pdf" target="_blank">http://www.open-std.org/jtc1/<wbr>sc22/wg21/docs/papers/2017/<wbr>p0707r0.pdf</a></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Given the differences between Python and C++, it’s obviously got a different approach, though I am struck by the similarities. I think it’s also a good presentation on the value and use of metaclasses, so likely also interesting for those of us who occasionally teach or explain the concept.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Cheers,<u></u><u></u></p><p class="MsoNormal">Steve<u></u><u></u></p></div></div><br>______________________________<wbr>_________________<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/<wbr>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/<wbr>mailman/options/python-dev/<wbr>guido%40python.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank">python.org/~guido</a>)</div>
</div>