<div dir="auto">I dislike the symbol '+' to mean "dictionary merging with value updates." I have no objection to, and mildly support, adding '|' with this meaning. <div dir="auto"><br></div><div dir="auto">It's not really possible to give "that one example" where + for meeting makes code less clear... In my eyes it would be EVERY such use. Every example presented in this thread or in the PEP feels wrong to me. I know about operator overloading and dunder methods and custom classes. My intuition about '+' from math, other programming languages, and Python, simply does not lead me to expect the proposed meaning. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 21, 2019, 12:43 PM Steven D'Aprano <<a href="mailto:steve@pearwood.info">steve@pearwood.info</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'd like to make a plea to people:<br>
<br>
I get it, there is now significant opposition to using the + symbol for <br>
this proposed operator. At the time I wrote the first draft of the PEP, <br>
there was virtually no opposition to it, and the | operator had very <br>
little support. This has clearly changed.<br>
<br>
At this point I don't think it is productive to keep making subjective <br>
claims that + will be more confusing or surprising. You've made your <br>
point that you don't like it, and the next draft^1 of the PEP will make <br>
that clear.<br>
<br>
But if you have *concrete examples* of code that currently is easy to <br>
understand, but will be harder to understand if we add dict.__add__, <br>
then please do show me!<br>
<br>
For those who oppose the + operator, it will help me if you made it <br>
clear whether it is *just* the + symbol you dislike, and would accept <br>
the | operator instead, or whether you hate the whole operator concept <br>
regardless of how it is spelled.<br>
<br>
And to those who support this PEP, code examples where a dict merge <br>
operator will help are most welcome!<br>
<br>
<br>
<br>
<br>
^1 Coming Real Soon Now™.<br>
<br>
<br>
-- <br>
Steven<br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank" rel="noreferrer">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div>