@@ -485,7 +485,7 @@ PyObject Slots
485
485
--------------
486
486
487
487
The type object structure extends the :c:type: `PyVarObject ` structure. The
488
- :c:member: `~PyVarObject.ob_size ` field is used for dynamic types (created by :func: `type_new `,
488
+ :c:member: `~PyVarObject.ob_size ` field is used for dynamic types (created by :c: func: `! type_new `,
489
489
usually called from a class statement). Note that :c:data: `PyType_Type ` (the
490
490
metatype) initializes :c:member: `~PyTypeObject.tp_itemsize `, which means that its instances (i.e.
491
491
type objects) *must * have the :c:member: `~PyVarObject.ob_size ` field.
@@ -740,7 +740,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
740
740
Before version 3.12, it was not recommended for
741
741
:ref: `mutable heap types <heap-types >` to implement the vectorcall
742
742
protocol.
743
- When a user sets :attr: `~type .__call__ ` in Python code, only *tp_call * is
743
+ When a user sets :attr: `~object .__call__ ` in Python code, only *tp_call * is
744
744
updated, likely making it inconsistent with the vectorcall function.
745
745
Since 3.12, setting ``__call__ `` will disable vectorcall optimization
746
746
by clearing the :c:macro: `Py_TPFLAGS_HAVE_VECTORCALL ` flag.
@@ -1369,8 +1369,8 @@ and :c:data:`PyType_Type` effectively act as defaults.)
1369
1369
The :c:member: `~PyTypeObject.tp_traverse ` pointer is used by the garbage collector to detect
1370
1370
reference cycles. A typical implementation of a :c:member: `~PyTypeObject.tp_traverse ` function
1371
1371
simply calls :c:func: `Py_VISIT ` on each of the instance's members that are Python
1372
- objects that the instance owns. For example, this is function :c:func: `local_traverse ` from the
1373
- :mod: `_thread ` extension module::
1372
+ objects that the instance owns. For example, this is function :c:func: `! local_traverse ` from the
1373
+ :mod: `! _thread ` extension module::
1374
1374
1375
1375
static int
1376
1376
local_traverse(localobject *self, visitproc visit, void *arg)
@@ -1721,7 +1721,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
1721
1721
called; it may also be initialized to a dictionary containing initial attributes
1722
1722
for the type. Once :c:func: `PyType_Ready ` has initialized the type, extra
1723
1723
attributes for the type may be added to this dictionary only if they don't
1724
- correspond to overloaded operations (like :meth: `__add__ `). Once
1724
+ correspond to overloaded operations (like :meth: `~object. __add__ `). Once
1725
1725
initialization for the type has finished, this field should be
1726
1726
treated as read-only.
1727
1727
@@ -1818,7 +1818,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
1818
1818
**Default: **
1819
1819
1820
1820
This slot has no default. For :ref: `static types <static-types >`, if the
1821
- field is ``NULL `` then no :attr: `__dict__ ` gets created for instances.
1821
+ field is ``NULL `` then no :attr: `~object. __dict__ ` gets created for instances.
1822
1822
1823
1823
If the :c:macro: `Py_TPFLAGS_MANAGED_DICT ` bit is set in the
1824
1824
:c:member: `~PyTypeObject.tp_dict ` field, then
@@ -1830,18 +1830,18 @@ and :c:data:`PyType_Type` effectively act as defaults.)
1830
1830
1831
1831
An optional pointer to an instance initialization function.
1832
1832
1833
- This function corresponds to the :meth: `__init__ ` method of classes. Like
1834
- :meth: `__init__ `, it is possible to create an instance without calling
1835
- :meth: `__init__ `, and it is possible to reinitialize an instance by calling its
1836
- :meth: `__init__ ` method again.
1833
+ This function corresponds to the :meth: `~object. __init__ ` method of classes. Like
1834
+ :meth: `! __init__ `, it is possible to create an instance without calling
1835
+ :meth: `! __init__ `, and it is possible to reinitialize an instance by calling its
1836
+ :meth: `! __init__ ` method again.
1837
1837
1838
1838
The function signature is::
1839
1839
1840
1840
int tp_init(PyObject *self, PyObject *args, PyObject *kwds);
1841
1841
1842
1842
The self argument is the instance to be initialized; the *args * and *kwds *
1843
1843
arguments represent positional and keyword arguments of the call to
1844
- :meth: `__init__ `.
1844
+ :meth: `~object. __init__ `.
1845
1845
1846
1846
The :c:member: `~PyTypeObject.tp_init ` function, if not ``NULL ``, is called when an instance is
1847
1847
created normally by calling its type, after the type's :c:member: `~PyTypeObject.tp_new ` function
@@ -2130,7 +2130,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
2130
2130
In other words, it is used to implement
2131
2131
:ref: `vectorcall <vectorcall >` for ``type.__call__ ``.
2132
2132
If ``tp_vectorcall `` is ``NULL ``, the default call implementation
2133
- using :attr: ` __new__ ` and :attr: ` __init__ ` is used.
2133
+ using :meth: ` ~object. __new__ ` and :meth: ` ~object. __init__ ` is used.
2134
2134
2135
2135
**Inheritance: **
2136
2136
@@ -2329,8 +2329,8 @@ Mapping Object Structures
2329
2329
.. c :member :: objobjargproc PyMappingMethods.mp_ass_subscript
2330
2330
2331
2331
This function is used by :c:func: `PyObject_SetItem `,
2332
- :c:func: `PyObject_DelItem `, :c:func: `PyObject_SetSlice ` and
2333
- :c:func: `PyObject_DelSlice `. It has the same signature as
2332
+ :c:func: `PyObject_DelItem `, :c:func: `PySequence_SetSlice ` and
2333
+ :c:func: `PySequence_DelSlice `. It has the same signature as
2334
2334
:c:func: `!PyObject_SetItem `, but *v * can also be set to ``NULL `` to delete
2335
2335
an item. If this slot is ``NULL ``, the object does not support item
2336
2336
assignment and deletion.
@@ -2552,7 +2552,7 @@ Async Object Structures
2552
2552
PyObject *am_aiter(PyObject *self);
2553
2553
2554
2554
Must return an :term: `asynchronous iterator ` object.
2555
- See :meth: `__anext__ ` for details.
2555
+ See :meth: `~object. __anext__ ` for details.
2556
2556
2557
2557
This slot may be set to ``NULL `` if an object does not implement
2558
2558
asynchronous iteration protocol.
@@ -2563,7 +2563,8 @@ Async Object Structures
2563
2563
2564
2564
PyObject *am_anext(PyObject *self);
2565
2565
2566
- Must return an :term: `awaitable ` object. See :meth: `__anext__ ` for details.
2566
+ Must return an :term: `awaitable ` object.
2567
+ See :meth: `~object.__anext__ ` for details.
2567
2568
This slot may be set to ``NULL ``.
2568
2569
2569
2570
.. c :member :: sendfunc PyAsyncMethods.am_send
0 commit comments