mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)
This commit is contained in:
parent
0078a0c2a5
commit
4c155f738d
1 changed files with 1 additions and 1 deletions
|
@ -1716,7 +1716,7 @@ the descriptor defines :meth:`__set__` and/or :meth:`__delete__`, it is a data
|
|||
descriptor; if it defines neither, it is a non-data descriptor. Normally, data
|
||||
descriptors define both :meth:`__get__` and :meth:`__set__`, while non-data
|
||||
descriptors have just the :meth:`__get__` method. Data descriptors with
|
||||
:meth:`__set__` and :meth:`__get__` defined always override a redefinition in an
|
||||
:meth:`__get__` and :meth:`__set__` (and/or :meth:`__delete__`) defined always override a redefinition in an
|
||||
instance dictionary. In contrast, non-data descriptors can be overridden by
|
||||
instances.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue