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

Yury Selivanov yselivanov.ml at gmail.com
Fri Dec 15 09:55:04 EST 2017


I don't see any problems with implementing this on types defined in C. This isn't harder than implementing sizeof or pickling support, and NumPy classes already have implemented both. Maybe Yury forgot about METHSTATIC and METHCLASS?

I just tested class_getitem defined via METH_STATIC and it works. This means we don't need to add slots. Thanks for the hint, Serhiy!

Ivan, this might be worth mentioning in the PEP or in the docs.

Yury



More information about the Python-Dev mailing list