[Python-ideas] Adding "+" and "+=" operators to dict
Skip Montanaro
skip.montanaro at gmail.com
Thu Feb 12 04:24:58 CET 2015
Addition in the usual sense of the word wouldn't be commutative for
dictionaries. In particular, it's hard to see how you could define addition
so these two expressions are equal:
{'a': 1} + {'a': 2}
{'a': 2} + {'a': 1}
'+=' is no problem.
Skip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150211/9f281152/attachment.html>
More information about the Python-ideas
mailing list