Commit 2aa1036e authored by Raymond Hettinger's avatar Raymond Hettinger

Issue #10771: Clarify that descriptors get used in an *owner* class or one of its parents.

parent 639fed7c
...@@ -1353,10 +1353,11 @@ Implementing Descriptors ...@@ -1353,10 +1353,11 @@ Implementing Descriptors
^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^
The following methods only apply when an instance of the class containing the 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 method (a so-called *descriptor* class) appears in an *owner* class (the
another class, known as the *owner* class. In the examples below, "the descriptor must be in either the owner's class dictionary or in the class
attribute" refers to the attribute whose name is the key of the property in the dictionary for one of its parents). In the examples below, "the attribute"
owner class' :attr:`__dict__`. refers to the attribute whose name is the key of the property in the owner
class' :attr:`__dict__`.
.. method:: object.__get__(self, instance, owner) .. method:: object.__get__(self, instance, owner)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment