Author ezio.melotti
Recipients QuantumTim, alexandre.vassalotti, benjamin.peterson, exarkun, ezio.melotti, hotdog003, loewis
Date 2009-07-04.23:51:47
SpamBayes Score 9.14593e-08
Marked as misclassified No
Message-id <>
A dict.merge() method could be added so that:

>>> a = dict(x=10, y=20)
>>> b = dict(y=30, z=40)
>>> a.merge(b)
dict(x=10, y=20, z=40)
>>> b.merge(a)
dict(y=30, z=40, x=10)

In case of duplicate keys, the items of the second dict with the same
keys will be discarded (even if dict.update() does the opposite, I think
here it make more sense in this way).

I never needed to do something like this though, so I'm +0 about it.
Date User Action Args
2009-07-04 23:51:49ezio.melottisetrecipients: + ezio.melotti, loewis, exarkun, alexandre.vassalotti, QuantumTim, benjamin.peterson, hotdog003
2009-07-04 23:51:49ezio.melottisetmessageid: <>
2009-07-04 23:51:47ezio.melottilinkissue6410 messages
2009-07-04 23:51:47ezio.melotticreate