[Python-Dev] Accepting PEP 560 -- Core support for typing module and generic types (original) (raw)

Stephan Hoyer shoyer at gmail.com
Thu Dec 14 19:36:11 EST 2017


On Thu, Dec 14, 2017 at 4:29 PM Yury Selivanov <yselivanov.ml at gmail.com> wrote:

On Thu, Dec 14, 2017 at 7:03 PM, Guido van Rossum <guido at python.org> wrote: My motivation to add the slot wasn't the performance: it's just not possible to have a class-level getitem on types defined in C. The only way is to define a base class in C and then extend it in pure-Python. This isn't too hard usually, though.

This could potentially make it much more complicated to adding typing support to NumPy. numpy.ndarray is defined in C. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20171215/ccdeb44a/attachment.html>



More information about the Python-Dev mailing list