bpo-38336: Remove the __set__ method restriction on data descriptors for attribute lookup precedence#16520
Conversation
brandtbucher
left a comment
There was a problem hiding this comment.
Thanks @maggyero, looks good to me!
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @rhettinger: please review the changes made to this pull request. |
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @rhettinger: please review the changes made to this pull request. |
|
Thanks @rhettinger for reviewing this. |
…for attribute lookup precedence (pythonGH-16520)
…for attribute lookup precedence (pythonGH-16520)
The language documentation states:
This override is not limited to data descriptors defining
__set__()(and__get__()). It is also true for data descriptors defining__delete__()(and__get__()) and data descriptors defining both__set__()and__delete__()(and__get__()).In other words, any data descriptors (objects defining either
__set__()or__delete__()or both) defining__get__()override an attribute redefinition in an instance dictionary.https://bugs.python.org/issue38336