<div dir="ltr"><div dir="ltr">On Fri, 1 Mar 2019 at 14:50, Eric V. Smith <<a href="mailto:eric@trueblade.com">eric@trueblade.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/1/2019 9:38 AM, INADA Naoki wrote:<br>
> Sorry, I'm not good at English enough to explain my mental model.<br>
> <br>
> I meant no skip, no ignorance, no throw away.<br>
> <br>
> In case of 1+2=3, both of 1 and 2 are not skipped, ignored or thrown away.<br>
> <br>
> On the other hand, in case of {a:1, b:2}+{a:2}={a:2, b:2}, I feel {a:1} <br>
> is skipped, ignored, or thrown away.  I used "lost" to explain it.<br>
> <br>
> And I used "lossless" for "there is no lost".  Not for reversible.<br>
> <br>
> If it isn't understandable to you, please ignore me.<br>
> <br>
> I think Rémi’s comment is very similar to my thought.  Merging mapping <br>
> is more complex than concatenate sequence and it seems hard to call it <br>
> "sum".<br>
<br>
I understand Inada to be saying that each value on the LHS (as shown <br>
above) affects the result on the RHS. That's the case with addition of <br>
ints and other types, but not so with the proposed dict addition. As he <br>
says, the {a:1} doesn't affect the result. The result would be the same <br>
if this key wasn't present in the first dict, or if the key had a <br>
different value.<br>
<br>
This doesn't bother me, personally. I'm just trying to clarify.<br></blockquote><div><br></div><div>OK, thanks for explaining! So more formally speaking, you want to say that for other examples of '+' in Python</div><div>x1 + y == x2 + y if and only if x1 == x2, while for the proposed '+' for dicts there may be many different x_i such that</div><div>x_i + y gives the same result.</div><div><br></div><div>This doesn't bother me either, since this is not a critical requirement for addition. I would say this is rather a coincidence</div><div>than a conscious decision.</div><div><br></div><div>--</div><div>Ivan</div><div><br></div><div><br></div></div></div>