[Tutor] quick function variable
Alan Gauld
alan.gauld at yahoo.co.uk
Wed Feb 9 04:59:38 EST 2022
On 09/02/2022 00:39, Cameron Simpson wrote:
> Keyword arguments can be unpacked from a mapping such as a dict.
>
> kw = {'name': 'Bob'}
> func(**kw)
Doh! How did I forget about that! :-)
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list