Ken Jin <kenjin4...@gmail.com> added the comment:
> maybe it was a mistake to expose this I was wondering if this was accidentally added at the time too. > Remind me what use is made of this from C code It's required for a C extension type to implement the __class_getitem__ method properly. Eg. ``MyCType[int]``. The other alternative is for them to import the types.GenericAlias Python constructor and call that, but that seems strange. > Can we remove this from the stable API during beta? It was never exposed > before. Unfortunately, it seems like it has been (accidentally?) exposed since 3.9 :(. I see some 3rd party projects using it already, so I don't know if we can get rid of it so easily: https://github.com/Nuitka/Nuitka/blob/57fecfe6cc939f4694b57d2efa37d1893c06b85b/nuitka/build/include/nuitka/helper/subscripts.h#L97 CC-ing Petr, seeking advice on the C stable ABI for this please. ---------- nosy: +petr.viktorin _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44392> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com