hai shi <shihai1...@126.com> added the comment:
>Not a function, shouldn't be used with PyType_Slot: > * tp_dict - I'd add a PyType_GetDict if there is a need to get this > * tp_mro - I'd add a PyType_GetMRO if there is a need to get this I checked some other projects which use type fileds directly. cpython doesn't expose the tp_dict and tp_mro directly in headers. I am not sure which way is more better(calling function vs using fileld directly). refs: https://gitlab.gnome.org/GNOME/pygobject/-/blob/master/gi/gimodule.c#L1168 https://github.com/biolab/orange2/blob/db40a9449cb45b507d63dcd5739b223f9cffb8e6/source/orange/cls_orange.cpp#L587 ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41618> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com