functions and named keyword arguments

Diez B. Roggisch deetsNOSPAM at web.de
Mon Feb 21 07:16:13 EST 2005


> Sorry if this is a duplicate - I use the google interface and sometiems
> it screws up (not showing stuff you've posted *or* not posting it).
> Before you ask it's because at work I have no NNTP and *heavily*
> restricted http.

It is - so I requote my answer :)


Im not sure if I understand you fully, but if what you are after is how to
pass named parameters analog to positional args, do it as dict:

def foo(name=None):
    print name

foo(**{name: "Fuzzy"})

-- 
Regards,

Diez B. Roggisch



More information about the Python-list mailing list