WANTED: A good name for the pair (args, kwargs)
no.email at nospam.invalid
Thu Mar 4 14:37:59 CET 2010
Jonathan Fine <J.Fine at open.ac.uk> writes:
> 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)
I think this may have been broken in 3.x, but in 2.6 the compiler will
unpack directly if you put a tuple structure in the arg list:
def doit(fn, (args, kwargs), expect):
actual = fn(*args, **kwargs)
Otherwise I'd just say "all_args" or some such. Or just "args" which
you unpack into "pos_args" (positional args) and "kw_args".
More information about the Python-list