
March 1, 2019
6:29 a.m.
28.02.19 23:19, Greg Ewing пише:
Serhiy Storchaka 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).
But that always returns a dict. A '+' operator could be implemented by other mapping types to return a mapping of the same type.
And this opens a non-easy problem: how to create a mapping of the same type? Not all mappings, and even not all dict subclasses have a copying constructor.