
On 18/10/2019 15:43, Anders Hovmöller wrote:
On 18 Oct 2019, at 15:58, Brandt Bucher <brandtbucher@gmail.com> wrote: Basically the whole bottom quarter of the PEP!
https://www.python.org/dev/peps/pep-0584/#examples-of-candidates-for-the-dic...
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