[docs] [issue26979] The danger of PyType_FromSpec()
Petr Viktorin
report at bugs.python.org
Fri Sep 14 12:29:24 EDT 2018
Petr Viktorin <encukou at gmail.com> added the comment:
1) If I understand correctly, this problem could be solved by per-class C storage? Something like PyModuleDef.m_size / PyModule_GetState, but for classes?
2) Making PyType_GetSlot work for static types would not be trivial.
All types do have the same *basic* structure (the tp_* fields), but the nb_*/sq_*/etc. fields don't need to be in the same order, and might not exist at all.
Even making it work for the tp_* fields only would bake in some assumptions I do want to get rid of.
I'd like to understand your use case better. Do you have a specific example here?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26979>
_______________________________________
More information about the docs
mailing list