On 18/10/2019 15:43, Anders Hovmöller wrote:
On 18 Oct 2019, at 15:58, Brandt Bucher <brandtbuc...@gmail.com> wrote:
Basically the whole bottom quarter of the PEP!
https://www.python.org/dev/peps/pep-0584/#examples-of-candidates-for-the-dict-merging-operator
The examples would make more sense if the "before" picture was using modern
syntax fully. The alternative to
c = a + b
isn't the old
c = {}
c.update(a)
c.update(b)
but in fact:
c = {**a, **b}
I agree that the proposed + overload is nicer to read but the PEP isn't being
fair to the current syntax imo.
Since I think the {**a, **b} syntax is *horrible*, I think the PEP is
being more than fair! a + b is much easier to read and intuit than
{**a, **b}. The sequence of methods is clearer in meaning but more
cumbersome. All in all I think the operator is useful enough to justify
adding it.
--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/python-ideas@python.org/message/RXUZNXCEBHZTDDMSRUSMTOCHCN664LCB/
Code of Conduct: http://python.org/psf/codeofconduct/