[issue36144] Dictionary union. (PEP 584)

Sumit Jaiswal report at bugs.python.org
Mon Jun 15 01:50:31 EDT 2020


Sumit Jaiswal <justjais at gmail.com> added the comment:

First off, thanks for adding the feature, it's much appreciated.

But it'd be great if you guys can enable list merge for the dict having list as its value, in current form I believe it's handling only "key: value" merge.

for e.g.:
>>> d1 = {'spam': [1, 2, 3]}
>>> d2 = {'spam': [2, 3, 4]}
>>> d1 | d2
>>> {'spam': [1, 2, 3, 4]}

----------
nosy: +justjais

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36144>
_______________________________________


More information about the Python-bugs-list mailing list