>
> So, if M() existed, you could say:
>
> d = M(telephone, name)
> func(**d)
>
> or
>
> func(**M(telephone, name))
>
> Or, you could just use "d" from the first example for your own purposes
> unrelated to function calling.
>
My point is: We already have a way to pass the items in a dictionary as
> keyword args: let's not invent another one. Instead, let's focus on a
> general purpose way of creating a dictionary that meets the requirements of
> being able to be passed as keyword args. That way we'd me making the
> language more expressive beyond just function calls.
>
Personally my favourite potential outcome from all this would be allowing
the `**` mode separator in both dicts and calls, so you could write:
d = {**, telephone, name}
func(**d)
or
func(**, telephone, name)
Also I think Dominik has made an excellent point that this would only be
needed if there were no kwargs already, so this would also be possible:
func(**kwargs, telephone, name)
assuming that some relevant kwargs exist. Then there isn't even any new
syntax, just a way to interpret something which is currently forbidden.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/HQOXHGRDUSX52VEN3SRHFYBU5QWZ4DRZ/
Code of Conduct: http://python.org/psf/codeofconduct/