March 1, 2019
3:07 a.m.
On Thu, 28 Feb 2019 at 07:18, Serhiy Storchaka <storchaka@gmail.com> wrote:
[...]
I do not understand why we discuss a new syntax for dict merging if we already have a syntax for dict merging: {**d1, **d2} (which works with *all* mappings). Is not this contradicts the Zen?
FWIW there are already three ways for lists/sequences: [*x, *y] x + y x.extend(y) # in-place version We already have first and third for dicts/mappings, I don't see a big problem in adding a + for dicts, also this is not really a new syntax, just implementing couple dunders for a builtin class. So I actually like this idea. -- Ivan