
Feb. 13, 2015
3:43 a.m.
avoids any confusion over operators and having += duplicating the update method.
+= duplicates the extend method on lists. And it's really redundant for numbers, too: x += y x = x + y So plenty of precedent. And my experience with newbies (been teaching intro to python for a few years) is that they grab onto + for concatenating strings really quickly. And I have a hard time getting them to use other methods for building up strings. Dicts in general come later, but are key to python. But I don't know that newbies expect + to work for dicts or not -- updating a dict is simply a lot less common. -Chris