Explicit vararg values

Michael Torrie torriem at gmail.com
Sun Sep 23 00:16:13 EDT 2018


On 09/16/2018 04:39 PM, Buck Evan wrote:
> The syntax I'm proposing is:
>    f(**kwargs={'a': 1, 'b': 2})
> 
> as a synonym of f(a=1, b=2) when an appropriate dictionary is already on
> hand.

But if the kwargs dict already exists you can already unpack it:
f(**kwargs)
or
f(**{'a': 1, 'b': 2})

So I guess I'm unsure of how your proposal differs from this existing
syntax in use.



More information about the Python-list mailing list