<div dir="ltr">A slot is pretty expensive, as *every* class in existence will be another 8 bytes larger (and possibly more due to malloc rounding). So unless we find that there's a significant performance benefit I think we should hold back on this. IIRC Ivan has already measured an order of magnitude's speedup (well, 7x), so we may not need it. :-)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 14, 2017 at 3:49 PM, Yury Selivanov <span dir="ltr"><<a href="mailto:yselivanov.ml@gmail.com" target="_blank">yselivanov.ml@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ivan, Guido,<br>
<br>
Would it be possible to add a slot so that types defined in C can<br>
implement __class_getitem__?<br>
<br>
static PyClassMethodDef class_methods = {<br>
  Â  foo_class_getitem  Â  Â /* cm_class_getitem */<br>
}<br>
<br>
static PyTypeObject Foo = {<br>
  Â  .tp_class_methods = class_methods<br>
}<br>
<br>
Yury<br>
<div><div class="h5"><br>
On Mon, Dec 4, 2017 at 5:18 PM, Ivan Levkivskyi <<a href="mailto:levkivskyi@gmail.com">levkivskyi@gmail.com</a>> wrote:<br>
> Thank you! It looks like we have a bunch of accepted PEPs today.<br>
> It is great to see all this! Thanks everyone who participated in discussions<br>
> here, on python-ideas and<br>
> on typing tracker. Special thanks to Mark who started this discussion.<br>
><br>
> --<br>
> Ivan<br>
><br>
><br>
><br>
</div></div>> ______________________________<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:<br>
> <a href="https://mail.python.org/mailman/options/python-dev/yselivanov.ml%40gmail.com" rel="noreferrer" target="_blank">https://mail.python.org/<wbr>mailman/options/python-dev/<wbr>yselivanov.ml%40gmail.com</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>