[Python-checkins] bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)

Raymond Hettinger webhook-mailer at python.org
Tue Oct 29 03:04:08 EDT 2019


https://github.com/python/cpython/commit/4c155f738dc2e70ccb574f5169ad89c01753c6f7
commit: 4c155f738dc2e70ccb574f5169ad89c01753c6f7
branch: master
author: Géry Ogam <gery.ogam at gmail.com>
committer: Raymond Hettinger <rhettinger at users.noreply.github.com>
date: 2019-10-29T00:04:01-07:00
summary:

bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence (GH-16520)

files:
M Doc/reference/datamodel.rst

diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index c6c6e4075039c..2499aeb6996bb 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.
 



More information about the Python-checkins mailing list