I think a stronger argument to reject this (even for Python 4, and even if we could somehow get over the syntactic ambiguity) is that it's confusing. `+=` and `=+` are just visually too close, and the distinction is not all that intuitive. At least for `a += b` the expansion to `a = a + b` is a simple contraction. But for the proposed `a =+ b` the expansion would be a transposition: `a = b + a`. Given the uncommon use case this just isn't worth the potential confusion.
(Also, there are other possible meanings one could guess for `a =+ b`, given the meaning of `a += b`. E.g., because it's the exact mirror image, you could guess that it means `b = a + b`.) On Sat, Nov 12, 2016 at 12:23 PM, João Matos <jcrma...@gmail.com> wrote: > Hello, > > I understand that, but in my view a =- c and a = -c should not be same. > Maybe an ideia for Python 4. > > Best regards, > > JM > > > On 12-11-2016 20:19, Bernardo Sulzbach wrote: > >> On 2016-11-12 18:08, João Matos wrote: >> >>> a =- c is the same as a = c - a >>> >> >> This would break compatibility. >> >> a =- c >> >> is >> >> a = -c >> >> >> > _______________________________________________ > Python-ideas mailing list > Python-ideas@python.org > https://mail.python.org/mailman/listinfo/python-ideas > Code of Conduct: http://python.org/psf/codeofconduct/ > -- --Guido van Rossum (python.org/~guido)
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/