WANTED: A good name for the pair (args, kwargs)

Steve Holden steve at holdenweb.com
Thu Mar 4 13:14:35 EST 2010


Jonathan Fine wrote:
> Hi
> 
> We can call a function fn using
>     val = fn(*args, **kwargs)
> 
> I'm looking for a good name for the pair (args, kwargs).  Any suggestions?
> 
> Here's my use case:
>     def doit(fn , wibble, expect):
>         args, kwargs = wibble
>         actual = fn(*args, **kwargs)
>         if actual != expect:
>             # Something has gone wrong.
>             pass
> 
> This is part of a test runner.
> 
> For now I'll use argpair, but if anyone has a better idea, I'll use it.
> 
Not being able to find any existing names I called *args the
sequence-parameter and **kwarg the dict-parameter.

For your use, though, you might choose something like the "generic
parameter pair).

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
PyCon is coming! Atlanta, Feb 2010  http://us.pycon.org/
Holden Web LLC                 http://www.holdenweb.com/
UPCOMING EVENTS:        http://holdenweb.eventbrite.com/




More information about the Python-list mailing list