mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
fix description of super() behavior on descriptors
This commit is contained in:
parent
90b41f0281
commit
910a66566a
1 changed files with 1 additions and 1 deletions
|
|
@ -119,7 +119,7 @@ The important points to remember are:
|
||||||
The object returned by ``super()`` also has a custom :meth:`__getattribute__`
|
The object returned by ``super()`` also has a custom :meth:`__getattribute__`
|
||||||
method for invoking descriptors. The call ``super(B, obj).m()`` searches
|
method for invoking descriptors. The call ``super(B, obj).m()`` searches
|
||||||
``obj.__class__.__mro__`` for the base class ``A`` immediately following ``B``
|
``obj.__class__.__mro__`` for the base class ``A`` immediately following ``B``
|
||||||
and then returns ``A.__dict__['m'].__get__(obj, A)``. If not a descriptor,
|
and then returns ``A.__dict__['m'].__get__(obj, B)``. If not a descriptor,
|
||||||
``m`` is returned unchanged. If not in the dictionary, ``m`` reverts to a
|
``m`` is returned unchanged. If not in the dictionary, ``m`` reverts to a
|
||||||
search using :meth:`object.__getattribute__`.
|
search using :meth:`object.__getattribute__`.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue