On Feb 12, 2015, at 1:42 PM, Steven D'Aprano
wrote: Which is another way of saying that there is no one obviously correct and generally useful way to merge two dicts. Well, actually there is one, and we already have the dict.update method to do it. If + duplicates that, it's redundant, and if it doesn't, it's non-obvious and likely to be of more limited use.
The fact that we already have dict.update indicates to me that the way dict.update works is the sensible way for + and += to work. I mean by your logic why do we have + and += for lists? People could just use copy() and extend() if they wanted to. Wanting to add two dictionaries is a fairly common desire, both with and without copying. If it weren't then it wouldn't pop up with some regularity on python-ideas. The real questionis what semantics do you give it, which I think is a fairly silly question because we already have the semantics defined via dict.update() and the dictionary literal and the dict() constructor itself. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA