[Python-ideas] Adding "+" and "+=" operators to dict

Eric Snow ericsnowcurrently at gmail.com
Fri Feb 13 00:28:36 CET 2015


On Thu, Feb 12, 2015 at 5:25 AM, Donald Stufft <donald at stufft.io> wrote:
> I’ve wanted this several times, explicitly the copying variant of it. I always
> get slightly annoyed whenever I have to manually spell out the copy and the
> update.

copy-and-update:

  dict(old_dict, **other_dict)

-eric


More information about the Python-ideas mailing list