On 06/26/2019 07:34 AM, Anders Hovmöller wrote:
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.
True, it can do anything -- but if the thing it does is not related to
combining two things together and returning the result, people will be
surprised and consider it a bad function. (Or they should. ;-)
Foo.bar = 1 doesn't mean set bar to 1 but calling a dunder method.
But the `Foo.` tells us Magic May Be Happening, and we still expect something
reasonable to occur -- perhaps a boundary check, maybe a cache lookup, perhaps
a type change to an equal-but-different representation (1.0 instead of 1, for
example), or even setting other dependent variables.
--
~Ethan~
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/M4TZ2XZZJFUDGPIWKXGN3JJ2B22JC3CQ/
Code of Conduct: http://python.org/psf/codeofconduct/