[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-29 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 4c155f738dc2e70ccb574f5169ad89c01753c6f7 by Raymond Hettinger 
(Géry Ogam) in branch 'master':
bpo-38336: Remove the __set__ method restriction on data descriptors for 
attribute lookup precedence (GH-16520)
https://github.com/python/cpython/commit/4c155f738dc2e70ccb574f5169ad89c01753c6f7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-29 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
priority: normal -> low

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-28 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
assignee: docs@python -> rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-28 Thread Géry

Change by Géry :


--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

Change by Géry :


--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

New submission from Géry :

The [language 
documentation](https://docs.python.org/3/reference/datamodel.html#invoking-descriptors)
 states:

> Data descriptors with __set__() and __get__() defined always override a 
> redefinition in an instance dictionary. In contrast, non-data descriptors can 
> be overridden by instances.

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.

--
assignee: docs@python
components: Documentation
messages: 353685
nosy: docs@python, maggyero
priority: normal
severity: normal
status: open
title: Remove the __set__ method restriction on data descriptors for attribute 
lookup precedence
type: enhancement
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

Géry  added the comment:

I have opened a PR here: https://github.com/python/cpython/pull/16520

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38336] Remove the __set__ method restriction on data descriptors for attribute lookup precedence

2019-10-01 Thread Géry

Change by Géry :


--
keywords: +patch
pull_requests: +16112
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/16520

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com