From: Géry Ogam Date: Tue, 29 Oct 2019 07:04:01 +0000 (+0100) Subject: bpo-38336: Remove the __set__ method restriction on data descriptors for attribute... X-Git-Tag: v3.9.0a1~108 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c155f738dc2e70ccb574f5169ad89c01753c6f7;p=thirdparty%2FPython%2Fcpython.git bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520) --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c6c6e4075039..2499aeb6996b 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -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.