
Feb. 12, 2015
3:21 p.m.
On Wed, Feb 11, 2015 at 9:59 PM, Chris Angelico <rosuav@gmail.com> wrote:
Does it have to be? It isn't commutative for strings or tuples either.
Good point. I never think of string "addition" as anything other than concatenation. I guess the same would be true of dictionaries. Still, if I add two strings, lists or tuples, the len() of the result is the same as the sum of the len()s. That wouldn't necessarily be the case for dictionaries, which, though well-defined, still can leave you open for a bit of a surprise when the keys overlap. Skip