[Python-ideas] Allow using ** twice
MRAB
python at mrabarnett.plus.com
Thu Jun 6 17:02:41 CEST 2013
On 06/06/2013 15:46, Ram Rachum wrote:
> I'd like to be able to use ** twice (using 2 different dicts) when
> calling a function, and have them both feed arguments into the function.
>
It's not possible to use * twice to feed 2 sets of positional arguments,
but you can use + to concatenate them, so would a better solution be to
have a way to merge 2 dicts?
For example:
temp = dict1 | dict2
would have the same result as:
temp = {}
temp.update(dict1)
temp.update(dict2)
More information about the Python-ideas
mailing list