<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Just to add to the discussion this was brought up previously as part of PEP 448 unpacking generalizations that also added {**x, **y} to merge two dicts in Python 3.5.<br></div><div><br></div><div>Previous python ideas thread : <a href="https://mail.python.org/pipermail/python-ideas/2015-February/031748.html">https://mail.python.org/pipermail/python-ideas/2015-February/031748.html</a></div><div>LWN summary : <a href="https://lwn.net/Articles/635397/">https://lwn.net/Articles/635397/</a></div><div><br></div><div>The previous thread is worth reading as some of the points still stand even with {**x, **y} added.<br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 27, 2019 at 9:59 PM João Matos <<a href="mailto:jcrmatos@gmail.com">jcrmatos@gmail.com</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 bgcolor="#FFFFFF">
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>
<br>
or even better<br>
dict_a += dict_b<br>
<br>
<br>
<pre class="gmail-m_7236037978981618539moz-signature" cols="72">Best regards,
João Matos
</pre>
</div>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="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" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Regards,<div>Karthikeyan S</div></div></div></div>