5 ms·
Gotta say though that I intuitivly think of the dict union operator x | y as {* * x, * * y}. Which is how I would have joined two dictionaries before, when I wa
by timfi 6y ago
Gotta say though that I intuitivly think of the dict union operator x | y as {* * x, * * y}. Which is how I would have joined two dictionaries before, when I wanted to produce a complete copy of one, i.e. not use dict.update.
- dr_zoidberg 6y agoAnd the behavior of x | y is consistent with both {x, y} and x.update(y).