In article <[EMAIL PROTECTED]>,
DENG <[EMAIL PROTECTED]> wrote:
>
>dict1={...something...}
>
>dict2={...somethind else ..}
>
>dict1 + dict2
>
>
>that's does works ..:(, it's not like List...
>
>
>anyone can tell me how to get it?
>
>thanks in advance
First, you have to tell us what you want to happen when the two
dictionaries have overlapping keys. Let's say I have:
d1 = {1: 'one', 2: 'two'}
d2 = {1: 'uno', 3: 'tres'}
if I do d3 = addDicts (d1, d2), what do you want d3 to have in it?
More specifically, what do you want the value of d3[1] to be?
--
http://mail.python.org/mailman/listinfo/python-list