diff options
author | Raymond Hettinger <python@rcn.com> | 2011-03-23 00:51:57 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2011-03-23 00:51:57 (GMT) |
commit | 1fd26525a4aa634227cd75ade711f2999e89d44a (patch) | |
tree | 490c75df8ea7b13e2d4fcfc220948ba1c4f23968 /Doc/reference | |
parent | 405a4717e1108b95d5af0e61dd304fe6407bd256 (diff) | |
download | cpython-1fd26525a4aa634227cd75ade711f2999e89d44a.zip cpython-1fd26525a4aa634227cd75ade711f2999e89d44a.tar.gz cpython-1fd26525a4aa634227cd75ade711f2999e89d44a.tar.bz2 |
Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents.
Diffstat (limited to 'Doc/reference')
-rw-r--r-- | Doc/reference/datamodel.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index b7137c9..7c2c9af 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1539,11 +1539,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 new-style class (known as the *owner* class) or one of its -descendants. In the examples below, "the attribute" refers to the attribute -whose name is the key of the property in the owner class' ``__dict__``. -Descriptors can only be implemented as new-style classes themselves. +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) |