Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on PEP 584 – Add + and – operators to the built-in dict class. Parent comment
> There's no reason you shouldn't have always been able to say d | d2, same as sets.
I don't agree with this view, mainly because merging a dict is not associative, while unionizing a set is.
The actual operation for "a + b" is "add everything from b set to a", and + more closely resembles that than |.
There are no comments on this comment yet.
> There's no reason you shouldn't have always been able to say d | d2, same as sets.
I don't agree with this view, mainly because merging a dict is not associative, while unionizing a set is.
The actual operation for "a + b" is "add everything from b set to a", and + more closely resembles that than |.