Re:PEP 584 – Add + and – operators to the built-in dict class
by mturmon on Wednesday March 06, 2019 @12:57PM
(#19320977)
That syntax doesn't make sense. The
{**d1, **d2}
idiom is just a clever mashup of Python's dictionary construction literal {}, and * * unpacking. That's why it only works with string-valued keys (which is a major limitation).
Adding a third item to the dictionary literal would require special-casing the {} dictionary construction literal.
Adding a third item to the dictionary literal would require special-casing the {} dictionary construction literal.