<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace"><span style="font-family:arial,sans-serif">On Fri, Nov 10, 2017 at 8:33 PM, Ivan Levkivskyi </span><span dir="ltr" style="font-family:arial,sans-serif"><<a href="mailto:levkivskyi@gmail.com" target="_blank">levkivskyi@gmail.com</a>></span><span style="font-family:arial,sans-serif"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On 10 November 2017 at 18:39, Koos Zevenhoven <span dir="ltr"><<a href="mailto:k7hoven@gmail.com" target="_blank">k7hoven@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span class=""><span><div style="font-family:monospace,monospace"><span style="font-family:arial,sans-serif">On Wed, Sep 27, 2017 at 12:28 PM, Ivan Levkivskyi </span><span dir="ltr" style="font-family:arial,sans-serif"><<a href="mailto:levkivskyi@gmail.com" target="_blank">levkivskyi@gmail.com</a>></span><span style="font-family:arial,sans-serif"> wrote:</span><br></div></span></span><span class=""><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:monospace,monospace;display:inline">​</div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:monospace,monospace;display:inline">​</div>After creating the class,<br>the original bases are saved in ``__orig_bases__`` (currently this is also<br>done by the metaclass).<br><br></div></blockquote><div><br></div></span><div><div style="font-family:monospace,monospace">​Those are *still* bases, right, even if they are not in the mro?​ I'm not sure if this is a naming thing or something even more.</div></div></div></div></span></div></blockquote><div><br></div><div>The objects that have __subclass_base__ method (proposed to rename to __mro_entry__)</div><div>are removed from __bases__ attributed of the newly created class. Otherwise they may cause a metaclass conflict.</div><div>One can however still call them syntactic (or static?) bases. For example this is how it is going to be used by typing:</div><div><br></div><div>    from typing import List</div><div><br></div><div>    class Tokens(List[int]):</div><div>        ...</div><div><br></div><div>    assert Tokens.__bases__ == (list,)<br></div><span class=""><div></div><div></div></span></div></div></div></blockquote><div><br></div><div><div class="gmail_default" style="font-family:monospace,monospace">​Why is List[int] not allowed to be the base? Neither method-lookup performance nor the metaclass conflict issue seem to depend on whether List[int] is in __bases__.</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">NOTE: These two method names are reserved for exclusive use by<br>the ``typing`` module and the generic types machinery, and any other use is<br>strongly discouraged. </div></blockquote><div><br></div></span><div><div style="font-family:monospace,monospace">​Given the situation, that may be a good thing. But will it really work? I think it is also strongly discouraged to invent your own dunder method names, but people still do it.​</div></div></div></div></div></blockquote><div><br></div></span><div>Terry had a similar comment. I will "soften" this formulation in the next revision of the PEP.<br></div><div> </div></div></div></div></blockquote><div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">​</div></div><div><div class="gmail_default" style="font-family:monospace,monospace;display:inline">Right, I assume you mean the one where he pointed out that implicitly turning the methods into staticmethods based on their names makes those names reserved words.  </div></div></div><div class="gmail_default" style="font-family:monospace,monospace">​</div><div class="gmail_default" style="font-family:monospace,monospace">​-- Koos</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">+ Koos Zevenhoven + <a href="http://twitter.com/k7hoven" target="_blank">http://twitter.com/k7hoven</a> +</div>
</div></div>