summaryrefslogtreecommitdiffstats
path: root/Doc/library/inspect.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-06-18 08:20:22 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-06-18 08:20:22 (GMT)
commit2fec611a70ba862a4127b7656a6d98d48850c3af (patch)
treee8d3470232edc34a9e7adbe609f261150cc08b0c /Doc/library/inspect.rst
parentd91e676fd58a25420a3dc8705472dc6bf9ca46e2 (diff)
parentbae5d81f5d1f388aad48c2ce1aee8682b157e1bd (diff)
downloadcpython-2fec611a70ba862a4127b7656a6d98d48850c3af.zip
cpython-2fec611a70ba862a4127b7656a6d98d48850c3af.tar.gz
cpython-2fec611a70ba862a4127b7656a6d98d48850c3af.tar.bz2
Issue #24314: Merge doc links from 3.5
Diffstat (limited to 'Doc/library/inspect.rst')
-rw-r--r--Doc/library/inspect.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/inspect.rst b/Doc/library/inspect.rst
index 91c585e..5cb7c22 100644
--- a/Doc/library/inspect.rst
+++ b/Doc/library/inspect.rst
@@ -355,8 +355,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
@@ -369,11 +370,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.