[Python-ideas] dict '+' operator and slicing support for pop

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Mar 17 22:03:54 CET 2009


George Sakkis wrote:

> It's hard to put in words exactly why but I expect "a+b"
> to take into account the full state of the operands, not just a part
> of it.

I think one expects a + operator to be somehow symmetrical
with respect to its operands. The lopsidedness of dict
updating violates this expectation, and so is better
represented by an asymmetrical syntax.

-- 
Greg



More information about the Python-ideas mailing list