Re: Adding dictionaries

George Reynolds (george@vicorp.com)
Fri, 5 Aug 94 13:52:56 EDT

>> What I would like to see is:
>> >>> a+b
>> {'test': 1, 'test2': 3}
>>
>> if a and b both had the same keys, then I think b should override the
>> keys in a.
>> You could also do subtraction of key-value pairs.
>>
>> --
>> Lance Ellinghouse lance@fox.com
>>

I like the concept, but I get uncomfortable when the 'standard' semantics
of an operand is changed. In this case '+' is thought of as being
commutative. However the semantics you propose is not. How'bout

>>> a.add(b)

or other variations with different semantics.

+ George Reynolds
+ VI Corporation
+ 47 Pleasant St
+ Northampton MA 01060
+
+ george@vicorp.com
+ 413-586-4144