The value you provide as the second argument must be a dictionary.

Google kwargs python for lots of more in depth info

On Fri, Dec 10, 2010 at 2:14 PM, Alex Hall <mehg...@gmail.com> wrote:

> 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)
> mehg...@gmail.com; http://www.facebook.com/mehgcap
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Joel Goldstick
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to