[Python-ideas] Allow using ** twice

Markus Unterwaditzer markus at unterwaditzer.net
Thu Jun 6 17:28:38 CEST 2013
Yes, this was by suggestion, but rather using the + operator.

-- Markus (from phone)

MRAB <python at mrabarnett.plus.com> wrote:
>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)
>
>_______________________________________________
>Python-ideas mailing list
>Python-ideas at python.org
>http://mail.python.org/mailman/listinfo/python-ideas



More information about the Python-ideas mailing list