Add two dicts

Christos TZOTZIOY Georgiou tzot at
Fri Aug 29 15:01:27 CEST 2003

On 29 Aug 2003 05:40:15 -0700, rumours say that mis6 at (Michele
Simionato) might have written:


>    def __add__(self,other):
>        self.update(other)
>        return self.__class__(self)

hm... I am not sure about this; it's not iadd, so you shouldn't modify

Perhaps you should (untested):
    def __add__(self, other):
        temp = self.copy()
        return temp
TZOTZIOY, I speak England very best,
Microsoft Security Alert: the Matrix began as open source.

More information about the Python-list mailing list