Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


And the behavior of x | y is consistent with both {x, y} and x.update(y).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: