[Python-ideas] Adding "+" and "+=" operators to dict
Skip Montanaro
skip.montanaro at gmail.com
Thu Feb 12 16:21:36 CET 2015
More information about the Python-ideas mailing list
Thu Feb 12 16:21:36 CET 2015
- Previous message: [Python-ideas] Adding "+" and "+=" operators to dict
- Next message: [Python-ideas] Adding "+" and "+=" operators to dict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Feb 11, 2015 at 9:59 PM, Chris Angelico <rosuav at 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
- Previous message: [Python-ideas] Adding "+" and "+=" operators to dict
- Next message: [Python-ideas] Adding "+" and "+=" operators to dict
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list