[Python-ideas] PEP: Dict addition and subtraction
solipsis at pitrou.net
Thu Mar 21 08:56:44 EDT 2019
On Thu, 21 Mar 2019 23:51:12 +1100
Chris Angelico <rosuav at gmail.com> wrote:
> On Thu, Mar 21, 2019 at 11:45 PM Antoine Pitrou <solipsis at pitrou.net> wrote:
> > On Thu, 21 Mar 2019 23:35:36 +1100
> > Chris Angelico <rosuav at gmail.com> wrote:
> > > On Thu, Mar 21, 2019 at 10:35 PM Antoine Pitrou <solipsis at pitrou.net> wrote:
> > > > > but it's NOT a new operator, it is making use of an existing one, and sure
> > > > > you could guess at a couple meanings, but the merge one is probably one of
> > > > > the most obvious to guess, and one quick test and you know -- I really
> > > > > can't see it being a ongoing source of confusion.
> > > >
> > > > Did you actually read what I said? The problem is not to understand
> > > > what dict.__add__ does. It's to understand what code using the +
> > > > operator does, without knowing upfront whether the inputs are dicts.
> > >
> > > The + operator adds two things together. I don't understand the issue here.
> > I'm not expecting you to understand, either.
> ... then, in the interests of productive discussion, could you please
> explain? What is it about dict addition that makes it harder to
> understand than other addition?
"Productive discussion" is something that requires mutual implication.
Asking me to repeat exactly what I spelled out above (and that you
even quoted) is not productive.
More information about the Python-ideas