On Sat, 11 Apr 2020 01:52:13 +0200 Victor Stinner email@example.com wrote:
By the way, CPython currently uses statically allocated types for builtin types like str or list. This may have to change to run efficiently multiple subinterepters in parallel: each subinterpeter should have its own heap-allocated type with its own reference counter.
Using heap allocated types means that PyUnicode_Check() implementation has to change. It's just another good reason to better hide PyUnicode_Check() implementation right now ;-)
I'm not sure I understand. If PyUnicode_Check() uses tp_flags, it doesn't have to change, precisely.