[Python-ideas] Adding "+" and "+=" operators to dict

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Feb 14 05:32:50 CET 2015


Steven D'Aprano wrote:
> I think that focusing on the question of "which wins" in the case of 
> duplicate keys, the left or right operand, is not very productive. We 
> can just declare that Python semantics are that the last value seen 
> wins,

Sure we can, but that's something to be learned. It's
not going to be obvious to everyone.

-- 
Greg


More information about the Python-ideas mailing list