[Python-ideas] keyword arguments everywhere (stdlib) - issue8706

Serhiy Storchaka storchaka at gmail.com
Sat Mar 3 22:54:39 CET 2012


03.03.12 23:40, Cameron Simpson написав(ла):
> On 03Mar2012 11:53, Serhiy Storchaka<storchaka at gmail.com>  wrote:
> | 03.03.12 00:46, Guido van Rossum написав(ла):
> |>  Alternative proposal: how about using '/' ? It's kind of the opposite
> |>  of '*' which means "keyword argument", and '/' is not a new character.
> |
> | How about using '**' (and left '/' for some purpose in the future)?
>
> -1 from me; too much overlap with **kwargs keyword argument insertion in
> calls. We'd have ** in calls for keyword arguments and ** in definitions
> for not keyword arguments.

"*identifier" is a tuple receiving any excess positional parameters.
"**identifier" is a dictionary receiving any excess keyword arguments.
Parameters after "*" are keyword-only parameters.
? Parameters before "**" are positional-only parameters.




More information about the Python-ideas mailing list