[Tutor] the "**" operator?

Alex Hall mehgcap at gmail.com
Fri Dec 10 20:14:30 CET 2010


Hi all,
I was googling a way to do something like
mydict=mydict.extend(additionaldict)

and someone on a forum recommends this:
mydict=dict(mydict, **additionaldict)
What is the ** doing here? I tried to look it up, but Google seems to
ignore it since it is punctuation. The poster on the forum says it
will put all elements of additionaldict in mydict that are not already
in mydict, which is the behavior I am looking for, but I am not sure
why this would be so. TIA.

-- 
Have a great day,
Alex (msg sent from GMail website)
mehgcap at gmail.com; http://www.facebook.com/mehgcap


More information about the Tutor mailing list