diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-06-18 03:57:31 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-06-18 03:57:31 (GMT) |
commit | bae5d81f5d1f388aad48c2ce1aee8682b157e1bd (patch) | |
tree | 5755103b2fc69d7beb51e425bfde6913a633a4d6 /Doc/library/inspect.rst | |
parent | 886a5f352fd64bcdc814dad292bbb37739a1cdd9 (diff) | |
download | cpython-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/library/inspect.rst')
-rw-r--r-- | Doc/library/inspect.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst index b28d0f9..8e7ed19 100644 --- a/Doc/library/inspect.rst +++ b/Doc/library/inspect.rst @@ -374,8 +374,9 @@ attributes: are true. This, for example, is true of ``int.__add__``. An object passing this test - has a :attr:`__get__` attribute but not a :attr:`__set__` attribute, but - beyond that the set of attributes varies. :attr:`__name__` is usually + has a :meth:`~object.__get__` method but not a :meth:`~object.__set__` + method, but beyond that the set of attributes varies. A + :attr:`~definition.__name__` attribute is usually sensible, and :attr:`__doc__` often is. Methods implemented via descriptors that also pass one of the other tests @@ -388,11 +389,11 @@ attributes: Return true if the object is a data descriptor. - Data descriptors have both a :attr:`__get__` and a :attr:`__set__` attribute. + Data descriptors have both a :attr:`~object.__get__` and a :attr:`~object.__set__` method. Examples are properties (defined in Python), getsets, and members. The latter two are defined in C and there are more specific tests available for those types, which is robust across Python implementations. Typically, data - descriptors will also have :attr:`__name__` and :attr:`__doc__` attributes + descriptors will also have :attr:`~definition.__name__` and :attr:`__doc__` attributes (properties, getsets, and members have both of these attributes), but this is not guaranteed. |