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

I agree that the update function can be cumbersome, but the "+" operator implies semantics that do not apply well to dictionaries. For example, the following is illegal in python:

  {1, 2, 3} + {3, 4, 5}
Similarly, addition with dicts should not be allowed. The pipe operator would be a closer fit, but even that has problems because with sets it's commutative and with dicts it's not.


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

Search: