Message395831
> 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. |
|
Date |
User |
Action |
Args |
2021-06-14 18:04:19 | kj | set | recipients:
+ kj, gvanrossum, ronaldoussoren, petr.viktorin, docs@python, Guido.van.Rossum, JelleZijlstra |
2021-06-14 18:04:19 | kj | set | messageid: <1623693859.24.0.126171267485.issue44392@roundup.psfhosted.org> |
2021-06-14 18:04:19 | kj | link | issue44392 messages |
2021-06-14 18:04:19 | kj | create | |
|