Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
bpo-36743: __get__ is sometimes called without the owner argument
  • Loading branch information
rhettinger committed Aug 29, 2019
commit cd4c1cf5cfc966d394a8b084acd43a00ea24cda3
13 changes: 7 additions & 6 deletions Doc/reference/datamodel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1620,12 +1620,13 @@ class' :attr:`~object.__dict__`.

.. method:: object.__get__(self, instance, owner)

Called to get the attribute of the owner class (class attribute access) or of an
instance of that class (instance attribute access). *owner* is always the owner
class, while *instance* is the instance that the attribute was accessed through,
or ``None`` when the attribute is accessed through the *owner*. This method
should return the (computed) attribute value or raise an :exc:`AttributeError`
exception.
Called to get the attribute of the owner class (class attribute access) or
of an instance of that class (instance attribute access). The optional
*owner* argument is the owner class, while *instance* is the instance that
the attribute was accessed through, or ``None`` when the attribute is
accessed through the *owner*. Note that callers are allowed to omit the
*owner* argument when it isn't needed. This method should return the
(computed) attribute value or raise an :exc:`AttributeError` exception.


.. method:: object.__set__(self, instance, value)
Expand Down