On 26 Jun 2019, at 14:28, Rhodri James firstname.lastname@example.org wrote:
On 26/06/2019 08:34, Yanghao Hua wrote: I find the objection reasoning very strange as none of the default behavior changed, and yet if you use this feature you do need to worry about the object behavior regarding assignment, this is true for descriptors and all other magics.
The problem is not the default behaviour. The problem is that the average reader of your code cannot know that something that appears to be an ordinary assignment has been redefined elsewhere to be something entirely herring. Your code stops being understandable to other people.
I 100% agree that this proposal is a bad idea. But I do have to play Devils advocate here.
The the-code-is-understandable-at-face-value ship has already sailed. + doesn't mean add, it means calling a dunder function that can do anything. Foo.bar = 1 doesn't mean set bar to 1 but calling a dunder method. In python code basically can't be understood at face value.