[issue41073] [C API] PyType_GetSlot() should accept static types
Petr Viktorin
report at bugs.python.org
Wed Jul 1 16:42:43 EDT 2020
Petr Viktorin <encukou at gmail.com> added the comment:
> If we extend PyType_GetSlot() to accept non-heaptype, we need find a way to judge the max slot of non-heaptype.
Static types can have some sub-slots structs but not others. A "max slot" will not help for types that have tp_as_mapping but not tp_as_number, for example.
You'll probably need some table like typeslots.inc to record which sub-slots struct each slot belongs to.
----------
nosy: +petr.viktorin
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41073>
_______________________________________
More information about the Python-bugs-list
mailing list