diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 23:27:57 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 23:27:57 (GMT) |
commit | 941b2c99f6cd076baf536689ec14f66078c4bd54 (patch) | |
tree | d5dce4dc4d49cebf6b6a359ce383c869ed1302c5 | |
parent | 09cbadd0057a74d79f0df0ac5aa1f49d3384e2f6 (diff) | |
parent | 2052978e9aa0622083df4ede4264541c3fdd4ede (diff) | |
download | cpython-941b2c99f6cd076baf536689ec14f66078c4bd54.zip cpython-941b2c99f6cd076baf536689ec14f66078c4bd54.tar.gz cpython-941b2c99f6cd076baf536689ec14f66078c4bd54.tar.bz2 |
Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents.
-rw-r--r-- | Doc/reference/datamodel.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 09ddaf5..129f987 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1352,10 +1352,11 @@ Implementing Descriptors ^^^^^^^^^^^^^^^^^^^^^^^^ The following methods only apply when an instance of the class containing the -method (a so-called *descriptor* class) appears in the class dictionary of -another class, known as the *owner* class. In the examples below, "the -attribute" refers to the attribute whose name is the key of the property in the -owner class' :attr:`__dict__`. +method (a so-called *descriptor* class) appears in an *owner* class (the +descriptor must be in either the owner's class dictionary or in the class +dictionary for one of its parents). In the examples below, "the attribute" +refers to the attribute whose name is the key of the property in the owner +class' :attr:`__dict__`. .. method:: object.__get__(self, instance, owner) |