[Python-ideas] The $update operator for dictionaries

Jonathan Fine jfine2358 at gmail.com
Sat Mar 9 16:13:25 EST 2019

I'm adopting an idea suggested by Anders and Chris.

To allow us better to focus on the main idea and purpose, I've
replaced '@' by '$' in the initial suggestion. And if the main idea is
accepted, we can if needed have an secondary discussion regarding the
details of the syntax.

Here's the restatement. I've also changed the subject line.

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 something like a.__idl_update__(b), and
    (a $update b)
would be similarly defined. (Here, 'idl' stand for 'incremented dollar'.)


More information about the Python-ideas mailing list