[Python-ideas] Dict joining using + and +=

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Feb 28 16:19:42 EST 2019


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.

-- 
Greg


More information about the Python-ideas mailing list