[Tutor] dynamic argument lists
bob gailer
bgailer at gmail.com
Sat Aug 30 15:16:56 CEST 2008
eShopping wrote:
> Bob, Kent
>
> thanks for the suggestions. Bob made the comment "If there is no
> compelling requirement that myfunc's argument be in the form **kwargs
> ...", but I'm afraid I don't understand the difference between
>
> myfunc (**kwargs)
>
> and
>
> myfunc (kwargs)
>
> Would someone mind explaining this? I never managed to find a
> satisfactory explanation for what "**" means!
>
Did you RTFM under 7.6 Function definitions? If so how did it fail to help?
"If the form ``|*identifier|'' is present, it is initialized to a tuple
receiving any excess positional parameters, defaulting to the empty tuple.
If the form ``|**identifier|'' is present, it is initialized to a new
dictionary receiving any excess keyword arguments."
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs we have more satisfying interatctions with others.
Nonviolent Communication provides tools for this awareness.
As a coach and trainer I can assist you in learning this process.
What is YOUR biggest relationship challenge?
More information about the Tutor
mailing list