[Python-ideas] PEP: Dict addition and subtraction

Antoine Pitrou solipsis at pitrou.net
Thu Mar 21 08:44:49 EDT 2019


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.

Regards

Antoine.




More information about the Python-ideas mailing list