functions and named keyword arguments
Fuzzyman
fuzzyman at gmail.com
Tue Feb 22 03:00:10 EST 2005
Diez B. Roggisch wrote:
> > 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"})
>
Brilliant - that's exactly what I was looking for.... thanks.
Regards,
Fuzzy
http://www.voidspace.org.uk/python/index.shtml
> --
> Regards,
>
> Diez B. Roggisch
More information about the Python-list
mailing list