A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-January/001873.html below:

[Python-Dev] Multiple dicts for string interpolation?

[Python-Dev] Multiple dicts for string interpolation?Guido van Rossum guido@CNRI.Reston.VA.US
Wed, 26 Jan 2000 07:41:45 -0500
[Tim]
> >     format % MultiDict(d1, d2, ...)
> > 
> > ?  That's exactly the same as the tuple idea, except there's a nice
> > descriptive word in the middle of it <wink>.

Nice.

[Jack]
> 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?

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/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4