Add two dicts
abelikov72 at hotmail.com
Fri Aug 29 06:11:09 CEST 2003
I have some code like this...
lots of stuff here with %(these)s named expressions
Then I wanted to add an item to the dict vars(self), so I tried :
This doesn't work, perhaps because no one could decide what should happen
to keys which already exist in the dict? (I'd say throw an exception).
Can I add two dicts in a way which is not cumbersome to the above % string
operation? Is this another case of writing my own function, or does a
builtin (or similar) already exist for this?
More information about the Python-list