[Python-ideas] Dict joining using + and +=
Rhodri James
rhodri at kynesim.co.uk
Wed Feb 27 11:44:11 EST 2019
On 27/02/2019 16:25, João Matos wrote:
> Hello,
>
> I would like to propose that instead of using this (applies to Py3.5 and upwards)
> dict_a = {**dict_a, **dict_b}
>
> we could use
> dict_a = dict_a + dict_b
>
> or even better
> dict_a += dict_b
While I don't object to the idea of concatenating dictionaries, I feel
obliged to point out that this last is currently spelled
dict_a.update(dict_b)
--
Rhodri James *-* Kynesim Ltd
More information about the Python-ideas
mailing list