@@ -110,7 +110,7 @@ Quick Reference
110110 +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
111111 | :c:member: `~PyTypeObject.tp_base ` | :c:type: `PyTypeObject ` * | __base__ | | | X | |
112112 +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
113- | :c:member: `~PyTypeObject.tp_dict ` | :c:type: `PyObject ` * | __dict__ | | | ? | |
113+ | << :c:member: `~PyTypeObject.tp_dict `>> | :c:type: `PyObject ` * | __dict__ | | | ? | |
114114 +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
115115 | :c:member: `~PyTypeObject.tp_descr_get ` | :c:type: `descrgetfunc ` | __get__ | | | | X |
116116 +------------------------------------------------+-----------------------------------+-------------------+---+---+---+---+
@@ -157,6 +157,9 @@ Quick Reference
157157 **<> **: Names in angle brackets should be initially set to ``NULL `` and
158158 treated as read-only.
159159
160+ **<<>> **: Names in double angle brackets should be initially set to
161+ ``NULL `` and treated as read-only after initialization.
162+
160163 **[] **: Names in square brackets are for internal use only.
161164
162165 **<R> ** (as a prefix) means the field is required (must be non-``NULL ``).
@@ -1717,7 +1720,17 @@ and :c:type:`PyType_Type` effectively act as defaults.)
17171720 called; it may also be initialized to a dictionary containing initial attributes
17181721 for the type. Once :c:func: `PyType_Ready ` has initialized the type, extra
17191722 attributes for the type may be added to this dictionary only if they don't
1720- correspond to overloaded operations (like :meth: `__add__ `).
1723+ correspond to overloaded operations (like :meth: `__add__ `). Once
1724+ initialization for the type has finished, this field should be
1725+ treated as read-only.
1726+
1727+ .. versionchanged :: 3.12
1728+
1729+ Internals detail: For the static builtin types this is always ``NULL ``.
1730+ Instead, the dict for each is stored on ``PyInterpreterState ``.
1731+ If needed, use :c:func: `PyType_GetDict ` to get the corresponding
1732+ dict for those types. This is not normally necessary,
1733+ and certainly not for user-defined type objects.
17211734
17221735 **Inheritance: **
17231736
0 commit comments