diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-22 23:27:31 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-22 23:27:31 (GMT) |
commit | 2052978e9aa0622083df4ede4264541c3fdd4ede (patch) | |
tree | cd4b83fc917962d5d211c09d2bb0c6fe79ed2aa1 /Doc/reference/datamodel.rst | |
parent | 27f870982fe4fefb2e877a101a219915e620421b (diff) | |
parent | 3b654be1a48f6d8584c169e08687c02de0a4a71c (diff) | |
download | cpython-2052978e9aa0622083df4ede4264541c3fdd4ede.zip cpython-2052978e9aa0622083df4ede4264541c3fdd4ede.tar.gz cpython-2052978e9aa0622083df4ede4264541c3fdd4ede.tar.bz2 |
Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents.
Diffstat (limited to 'Doc/reference/datamodel.rst')
-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) |