From 1647bf053ee8604ae03b52fd9553e744d0a70ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Tue, 1 Oct 2019 12:03:03 +0200 Subject: [PATCH 1/3] Update datamodel.rst --- Doc/reference/datamodel.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index c6c6e4075039cd..3c8fc75d4af53f 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__` defined always override a redefinition in an instance dictionary. In contrast, non-data descriptors can be overridden by instances. From efc12adf29d5d71ef28828509c36c089337bc097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Tue, 29 Oct 2019 00:22:43 +0100 Subject: [PATCH 2/3] Update datamodel.rst --- Doc/reference/datamodel.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 3c8fc75d4af53f..23e7b6a2e47793 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1714,9 +1714,9 @@ define :meth:`__get__`, then accessing the attribute will return the descriptor object itself unless there is a value in the object's instance dictionary. If 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 define both :meth:`__get__` and :meth:`__set__` (and/or :meth:`__delete__`), while non-data descriptors have just the :meth:`__get__` method. Data descriptors with -: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. From 71c5c5aae281dded9cd0d17d82435db572838f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Ogam?= Date: Tue, 29 Oct 2019 07:31:38 +0100 Subject: [PATCH 3/3] Update datamodel.rst --- Doc/reference/datamodel.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 23e7b6a2e47793..2499aeb6996bb1 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1714,7 +1714,7 @@ define :meth:`__get__`, then accessing the attribute will return the descriptor object itself unless there is a value in the object's instance dictionary. If 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__` (and/or :meth:`__delete__`), while non-data +descriptors define both :meth:`__get__` and :meth:`__set__`, while non-data descriptors have just the :meth:`__get__` method. Data descriptors with :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