4 ms·
The existing alternative to `a | b` was {**a, **b} You could see this as an improvement.
by duckerude 6y ago
The existing alternative to `a | b` was
{**a, **b}
You could see this as an improvement.
- edgyquant 6y agoAs someone who started out in C I love the pointer style syntax
- rmtech 6y agoOh my god yes.
- philsnow 6y agoas pointed out elsewhere in this thread, `"a" or "b"` evaluates to "a", which kind of makes me think that `a | b` (with a and b as dicts) would take values for overlapping keys from a, not from b. The dict literal with dict-splats conveys a sense of ordering that makes the behavior of taking values for overlapping keys from the lattermost dict make more sense to me.