Re: [Python-Dev] Multiple dicts for string interpolation?

I've always wonderer why dict+dict isn't supported (or possibly dict|dict, if the key-collision semantics of + on dict are seen as a problem). Is there a good reason for this, or is it just that there are other more important things to implement? This wouldn't be a replacement for all uses of MultiDict, as it would probably have to create a new dict to keep semantics in line with those of list+list -- Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++ Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++ www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm

[Tim]
Nice. [Jack]
The reason is that + (or |) looks symmetrical, but for the key collisions, one of them has to lose. We now have dict1.update(dict2), which is a bit more cumbersome, but makes it much clearer who is the loser. --Guido van Rossum (home page: http://www.python.org/~guido/)

[Tim]
Nice. [Jack]
The reason is that + (or |) looks symmetrical, but for the key collisions, one of them has to lose. We now have dict1.update(dict2), which is a bit more cumbersome, but makes it much clearer who is the loser. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Guido van Rossum
-
Jack Jansen