[Python-ideas] The @update operator for dictionaries

Anders Hovmöller boxed at killingar.net
Sat Mar 9 10:57:50 EST 2019

I don't understand what you mean. Can you provide examples that show the state of the dicts before and after and what the syntax would be the equivalent of in current python?

> On 9 Mar 2019, at 16:33, Jonathan Fine <jfine2358 at gmail.com> 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.)
> For clarity, this would proceed via a.__iat_update__(b), and (a
> @update b) would be similarly defined.
> As major disadvantage, of course, will be that
>>>> guido at python.org
> would no longer be valid Python!
> And also we might have fewer animated discussions.
> -- 
> Jonathan
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

More information about the Python-ideas mailing list