summaryrefslogtreecommitdiffstats
path: root/Doc/c-api
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-06-18 03:57:31 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-06-18 03:57:31 (GMT)
commitbae5d81f5d1f388aad48c2ce1aee8682b157e1bd (patch)
tree5755103b2fc69d7beb51e425bfde6913a633a4d6 /Doc/c-api
parent886a5f352fd64bcdc814dad292bbb37739a1cdd9 (diff)
downloadcpython-bae5d81f5d1f388aad48c2ce1aee8682b157e1bd.zip
cpython-bae5d81f5d1f388aad48c2ce1aee8682b157e1bd.tar.gz
cpython-bae5d81f5d1f388aad48c2ce1aee8682b157e1bd.tar.bz2
Issue #24314: Fix doc links for general attributes like __name__, __dict__
Diffstat (limited to 'Doc/c-api')
-rw-r--r--Doc/c-api/module.rst4
-rw-r--r--Doc/c-api/typeobj.rst4
2 files changed, 4 insertions, 4 deletions
diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst
index 904b4b1..34f8443 100644
--- a/Doc/c-api/module.rst
+++ b/Doc/c-api/module.rst
@@ -59,10 +59,10 @@ Module Objects
.. index:: single: __dict__ (module attribute)
Return the dictionary object that implements *module*'s namespace; this object
- is the same as the :attr:`__dict__` attribute of the module object. This
+ is the same as the :attr:`~object.__dict__` attribute of the module object. This
function never fails. It is recommended extensions use other
:c:func:`PyModule_\*` and :c:func:`PyObject_\*` functions rather than directly
- manipulate a module's :attr:`__dict__`.
+ manipulate a module's :attr:`~object.__dict__`.
.. c:function:: PyObject* PyModule_GetNameObject(PyObject *module)
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index ac589b8..2c448a0 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -111,10 +111,10 @@ type objects) *must* have the :attr:`ob_size` field.
For statically allocated type objects, the tp_name field should contain a dot.
Everything before the last dot is made accessible as the :attr:`__module__`
attribute, and everything after the last dot is made accessible as the
- :attr:`__name__` attribute.
+ :attr:`~definition.__name__` attribute.
If no dot is present, the entire :c:member:`~PyTypeObject.tp_name` field is made accessible as the
- :attr:`__name__` attribute, and the :attr:`__module__` attribute is undefined
+ :attr:`~definition.__name__` attribute, and the :attr:`__module__` attribute is undefined
(unless explicitly set in the dictionary, as explained above). This means your
type will be impossible to pickle.