[Python-ideas] dict.merge(d1, d2, ...) (Counter proposal for PEP 584)
songofacandy at gmail.com
Thu Mar 21 22:06:08 EDT 2019
On Fri, Mar 22, 2019 at 1:21 AM Steven D'Aprano <steve at pearwood.info> wrote:
> How about dict.merged(*args, **kw)? Or dict.updated()?
+1 on "merged".
I feel the word "update" indicating mutating, and it's difficult to distinguish
between "update" and "updated".
> That would eliminate some of the difficulties with an operator, such as
> the difference between + which requires both operands to be a dict
> but += which can take any mapping or (key,value) iterable.
Inada Naoki <songofacandy at gmail.com>
More information about the Python-ideas