Steven D'Aprano asked me to explain the difference between > a@update=b > a@update b
It is the same as the difference between a += b a + b The one uses a._iadd__(b), a.__add__(b) and so on. For the other, replace 'add' by 'at_update', and '+' by '@update'. By the way, the expressions a@update b a @update b are to be equivalent, but a @ update b is something else (and not valid Python). > Is this supposed to be unique to update, or will there be an infinite > number of special dunder methods for arbitrary method names? There are (many) numbers between 1 and infinity. If a programmer defines __at_python__ on type(guido) then guido@python will have semantics. Steve wrote: > New syntax which breaks existing code is not likely to be > accepted without a *really* good reason. I'd like to see some real-world examples of code that would be broken. As I recall, most or all of the code examples in the python-ideas thread on the '@' operator actually write ' @ '. So they would be good. https://mail.python.org/pipermail/python-ideas/2014-March/027053.html And if otherwise a good idea, we can use the from __future__ trick to maintain compatibility. -- Jonathan _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/