On Sat, Mar 09, 2019 at 03:33:25PM +0000, Jonathan Fine wrote: > I've been thinking that it might be easier, in the long term, to make > a big step and allow > >>> a @update= b > as valid Python. What do you think? (I hope it will look nicer once > syntax highlighted.)
Are we supposed to know what that does? > For clarity, this would proceed via a.__iat_update__(b), and (a > @update b) would be similarly defined. For an explanation to be clear, you actually have to give an explanation. You can start with explaining the difference between the two different examples you give: a@update=b a@update b and what the default __iat_update__ does. Is this supposed to be unique to update, or will there be an infinite number of special dunder methods for arbitrary method names? a@spam=b # calls __iat_spam__ Does this apply to only dicts, or is it applicable to every object? > As major disadvantage, of course, will be that > >>> gu...@python.org > would no longer be valid Python! New syntax which breaks existing code is not likely to be accepted without a *really* good reason. -- Steven _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/