[Python-ideas] adding dictionaries

Jonas Wielicki j.wielicki at sotecware.net
Wed Jul 30 10:37:23 CEST 2014


On 30.07.2014 00:46, Greg Ewing wrote:
> Jonas Wielicki wrote:
>> FWIW, one could use an operator which inherently shows a direction: <<
>> and >>, for both directions respectively.
>>
>> A = B >> C lets B take precedence, and A = B << C lets C take precedence.
> 
> While it succeeds in indicating a direction, it
> fails to suggest any kind of addition or union.
> 

As already noted elsewhere (to continue playing devils advocate), its
not an addition or union anyways. It’s not a union because it is lossy
and not commutative it’s not something I’d call addition either.

While one can certainly see it as shifting the elements from dict A over
dict B.

regards,
jwi


More information about the Python-ideas mailing list