<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">I’d like to try my hand at implementing this, if nobody else is interested. I should be able to have something up today.<br><br><div id="AppleMailSignature" dir="ltr">Brandt</div><div dir="ltr"><br>On Feb 27, 2019, at 11:05, João Matos <<a href="mailto:jcrmatos@gmail.com">jcrmatos@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr">
  
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  
    Hello,<br>
    <br>
    Great.<br>
    Because I don't program in any other language except Python, I can't
    make the PR (with the C code).<br>
    Maybe someone who program in C can help?<br>
    <br>
    Best regards,<br>
    <br>
    <pre class="moz-signature" cols="72">João Matos
</pre>
    <div class="moz-cite-prefix">On 27-02-2019 18:48, Guido van Rossum
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAP7+vJJM6EKmxQwVgyPu+Ux0v1JLM2ok_TwtCcc5QpCzscEcsQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr"><br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Wed, Feb 27, 2019 at
            10:42 AM Michael Selik <<a href="mailto:mike@selik.org" moz-do-not-send="true">mike@selik.org</a>> wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div dir="ltr">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr"><br>
                  </div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">On Wed, Feb 27, 2019
                    at 10:22 AM Anders Hovmöller <<a href="mailto:boxed@killingar.net" target="_blank" moz-do-not-send="true">boxed@killingar.net</a>>
                    wrote:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px
                    0px 0.8ex;border-left:1px solid
                    rgb(204,204,204);padding-left:1ex">I dislike the
                    asymmetry with sets:<br>
                    <br>
                    > {1} | {2}<br>
                    {1, 2}<br>
                    <br>
                    To me it makes sense that if + works for dict then
                    it should for set too. <br>
                    <br>
                    / Anders<br>
                    <br>
                    > On 27 Feb 2019, at 17:25, João Matos <<a href="mailto:jcrmatos@gmail.com" target="_blank" moz-do-not-send="true">jcrmatos@gmail.com</a>>
                    wrote:<br>
                    > <br>
                    > Hello,<br>
                    > <br>
                    > I would like to propose that instead of using
                    this (applies to Py3.5 and upwards)<br>
                    > dict_a = {**dict_a, **dict_b}<br>
                    > <br>
                    > we could use<br>
                    > dict_a = dict_a + dict_b<br>
                  </blockquote>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  The dict subclass collections.Counter overrides the
                  update method for adding values instead of overwriting
                  values.</div>
                <div class="gmail_quote"><br>
                </div>
                <div class="gmail_quote"><a href="https://docs.python.org/3/library/collections.html#collections.Counter.update" target="_blank" moz-do-not-send="true">https://docs.python.org/3/library/collections.html#collections.Counter.update</a><br>
                </div>
                <div class="gmail_quote"><br>
                </div>
                <div class="gmail_quote">Counter also uses +/__add__ for
                  a similar behavior.<br>
                </div>
                <div class="gmail_quote">
                  <div><br>
                  </div>
                  <div>
                    <div>    >>> c = Counter(a=3, b=1)</div>
                    <div>    >>> d = Counter(a=1, b=2)</div>
                    <div>    >>> c + d # add two counters
                      together:  c[x] + d[x]</div>
                  </div>
                  <div>    Counter({'a': 4, 'b': 3})</div>
                  <div><br>
                  </div>
                  <div>At first I worried that changing base dict would
                    cause confusion for the subclass, but Counter seems
                    to share the idea that update and + are synonyms.</div>
                </div>
              </div>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>Great, this sounds like a good argument for + over |. The
            other argument is that | for sets *is* symmetrical, while +
            is used for other collections where it's not symmetrical. So
            it sounds like + is a winner here.<br>
          </div>
          <div> </div>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">--Guido van Rossum (<a href="http://python.org/~guido" target="_blank" moz-do-not-send="true">python.org/~guido</a>)</div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Python-ideas mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Python-ideas@python.org">Python-ideas@python.org</a>
<a class="moz-txt-link-freetext" href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a>
Code of Conduct: <a class="moz-txt-link-freetext" href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a>
</pre>
    </blockquote>
    <br>
  


</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>Python-ideas mailing list</span><br><span><a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a></span><br><span><a href="https://mail.python.org/mailman/listinfo/python-ideas">https://mail.python.org/mailman/listinfo/python-ideas</a></span><br><span>Code of Conduct: <a href="http://python.org/psf/codeofconduct/">http://python.org/psf/codeofconduct/</a></span><br></div></blockquote></body></html>