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

[Python-Dev] dict.supplement()

[Python-Dev] dict.supplement()Peter Funk python-dev@python.org
Sat, 18 Mar 2000 20:23:37 +0100 (MET)
Hi!
> > 	# pretend self and dict are dictionaries:
> > 	def supplement(self, dict):
> > 	    for k, v in dict.items():
> > 	        if not self.data.has_key(k):
> > 		    self.data[k] = v
 
Ka-Ping Yee schrieb:
> I'd go for that.  It would be nice to have a non-overwriting update().
> The only issue is the choice of verb; "supplement" sounds pretty
> reasonable to me.

In German we have the verb "ergänzen" which translates 
either into "supplement" or "complete" (from my  dictionary).  
"supplement" has the disadvantage of being rather long for 
the name of a builtin method.

Nevertheless I've used this in my class derived from UserDict.UserDict.

Now let's witch topic to the recent discussion about Set type:  
you all certainly know, that something similar has been done before by 
Aaron Watters?  see:
  <http://starship.python.net/crew/aaron_watters/kjbuckets/kjbuckets.html>

Regards, Peter
-- 
Peter Funk, Oldenburger Str.86, D-27777 Ganderkesee, Germany, Fax:+49 4222950260
office: +49 421 20419-0 (ArtCom GmbH, Grazer Str.8, D-28359 Bremen)



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