Currently Py_TPFLAGS_MANAGED_DICT is an internal-only flag, in fact setting in third-party code is likely to lead to a crash.
We would like to expose it, and a weakref equivalent Py_TPFLAGS_MANAGED_WEAKREFS to allow builtin classes to take advantage of compact object layout.
Compact layout uses less memory, performs better and allow more robust subclassing. So everyone should be able to use it.
Currently
Py_TPFLAGS_MANAGED_DICTis an internal-only flag, in fact setting in third-party code is likely to lead to a crash.We would like to expose it, and a weakref equivalent
Py_TPFLAGS_MANAGED_WEAKREFSto allow builtin classes to take advantage of compact object layout.Compact layout uses less memory, performs better and allow more robust subclassing. So everyone should be able to use it.
Py_TPFLAGS_MANAGED_DICTis usedPy_TPFLAGS_MANAGED_WEAKREFStp_dictoffsetandtp_weakreflist