On 17/10/2013 11:58 AM, Javier Candeira wrote:
The first result is a bug report, but it was rejected before it got to
PEP stage even: http://bugs.python.org/issue6410. Contains good
rationale for the rejection.



I think the last post there is the clincher.

What would be the result of {"a": 1, "b": 2} + {"a": 2, "b": 1}?

It could be:
a)  {"a": 1, "b": 2}
b) {"a": 2, "b": 1}
c) {"a": [1, 2], "b": [1,2]}
d) {"a":[1,2], "b":[2,1]}

All of the above make sense in some circumstances.

Also, most of the time you don't want a new dictionary - you really do just want to update an existing one, which is what the update method does.

Cheers,

Rasjid.

_______________________________________________
melbourne-pug mailing list
[email protected]
https://mail.python.org/mailman/listinfo/melbourne-pug

Reply via email to