On Mon, 28 May 2012 06:20:06 -0700, cate wrote:

> setup(**config)
> 
> What is the construct **?


It expands the dict "config" into keyword arguments. A single * expands 
to positional arguments.

A simple example:

args = [1, 2, 3]
kwargs = {'x': 4, 'y': 5}

somefunc(*args, **kwargs)

is expanded to 

somefunc(1, 2, 3, x=4, y=5)



-- 
Steven
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to