A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2010-March/720663.html below:

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

WANTED: A good name for the pair (args, kwargs)Paul Rubin no.email at nospam.invalid
Thu Mar 4 08:37:59 EST 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 mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4