Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4c155f7

Browse files
geryogamrhettinger
authored andcommitted
bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)
1 parent 0078a0c commit 4c155f7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/reference/datamodel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1716,7 +1716,7 @@ the descriptor defines :meth:`__set__` and/or :meth:`__delete__`, it is a data
17161716
descriptor; if it defines neither, it is a non-data descriptor. Normally, data
17171717
descriptors define both :meth:`__get__` and :meth:`__set__`, while non-data
17181718
descriptors have just the :meth:`__get__` method. Data descriptors with
1719-
:meth:`__set__` and :meth:`__get__` defined always override a redefinition in an
1719+
:meth:`__get__` and :meth:`__set__` (and/or :meth:`__delete__`) defined always override a redefinition in an
17201720
instance dictionary. In contrast, non-data descriptors can be overridden by
17211721
instances.
17221722

0 commit comments

Comments
 (0)