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-March/002665.html below:

[Python-Dev] dict.supplement() (was Re: list.shift())

[Python-Dev] dict.supplement() (was Re: list.shift()) [Python-Dev] dict.supplement() (was Re: list.shift())Fred L. Drake, Jr. fdrake@acm.org
Mon, 20 Mar 2000 11:55:59 -0500 (EST)
artcom0!pf@artcom-gmbh.de writes:
 > Note the similarities to {}.update(dict), but update replaces existing
 > entries in self, which is sometimes not desired.  I know, that supplement
 > can also simulated with:

Peter,
  I like this!

 > 	tmp = dict.copy()
 > 	tmp.update(self)
 > 	self.data = d

  I presume you mean "self.data = tmp"; "self.data.update(tmp)" would
be just a little more robust, at the cost of an additional update.


  -Fred

--
Fred L. Drake, Jr.	  <fdrake at acm.org>
Corporation for National Research Initiatives



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