diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-09 10:26:17 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-09 10:26:17 (GMT) |
commit | 0b68a2d67538703b13d4a824acf736f8ef103dad (patch) | |
tree | 24f48762bab91bc3e602a5bc54d346f1427a1a36 /Doc/c-api/object.rst | |
parent | 91aaeac0508feebc0b7aa436e634892a472e7e93 (diff) | |
download | cpython-0b68a2d67538703b13d4a824acf736f8ef103dad.zip cpython-0b68a2d67538703b13d4a824acf736f8ef103dad.tar.gz cpython-0b68a2d67538703b13d4a824acf736f8ef103dad.tar.bz2 |
Issue 19195: Improved cross-references in C API documentation.
Diffstat (limited to 'Doc/c-api/object.rst')
-rw-r--r-- | Doc/c-api/object.rst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index a47183c..0aba360 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -60,8 +60,8 @@ Object Protocol Generic attribute getter function that is meant to be put into a type object's ``tp_getattro`` slot. It looks for a descriptor in the dictionary of classes in the object's MRO as well as an attribute in the object's - :attr:`__dict__` (if present). As outlined in :ref:`descriptors`, data - descriptors take preference over instance attributes, while non-data + :attr:`~object.__dict__` (if present). As outlined in :ref:`descriptors`, + data descriptors take preference over instance attributes, while non-data descriptors don't. Otherwise, an :exc:`AttributeError` is raised. @@ -85,8 +85,8 @@ Object Protocol object's ``tp_setattro`` slot. It looks for a data descriptor in the dictionary of classes in the object's MRO, and if found it takes preference over setting the attribute in the instance dictionary. Otherwise, the - attribute is set in the object's :attr:`__dict__` (if present). Otherwise, - an :exc:`AttributeError` is raised and ``-1`` is returned. + attribute is set in the object's :attr:`~object.__dict__` (if present). + Otherwise, an :exc:`AttributeError` is raised and ``-1`` is returned. .. c:function:: int PyObject_DelAttr(PyObject *o, PyObject *attr_name) @@ -189,9 +189,9 @@ Object Protocol be done against every entry in *cls*. The result will be ``1`` when at least one of the checks returns ``1``, otherwise it will be ``0``. If *inst* is not a class instance and *cls* is neither a type object, nor a class object, nor a - tuple, *inst* must have a :attr:`__class__` attribute --- the class relationship - of the value of that attribute with *cls* will be used to determine the result - of this function. + tuple, *inst* must have a :attr:`~instance.__class__` attribute --- the + class relationship of the value of that attribute with *cls* will be used + to determine the result of this function. Subclass determination is done in a fairly straightforward way, but includes a @@ -201,9 +201,9 @@ of. If :class:`A` and :class:`B` are class objects, :class:`B` is a subclass of either is not a class object, a more general mechanism is used to determine the class relationship of the two objects. When testing if *B* is a subclass of *A*, if *A* is *B*, :c:func:`PyObject_IsSubclass` returns true. If *A* and *B* -are different objects, *B*'s :attr:`__bases__` attribute is searched in a -depth-first fashion for *A* --- the presence of the :attr:`__bases__` attribute -is considered sufficient for this determination. +are different objects, *B*'s :attr:`~class.__bases__` attribute is searched in +a depth-first fashion for *A* --- the presence of the :attr:`~class.__bases__` +attribute is considered sufficient for this determination. .. c:function:: int PyObject_IsSubclass(PyObject *derived, PyObject *cls) |