I believe many have suggested that this is the “wrong” behavior, and maybe if we could go back in time, += would only take lists. But at this point, the behavior is set, and changing it would probably break more code than it would help.
Also, note that there is another way in which += differs from +: the inplace add operator “+=” does thing s in place if possible (i.e. if the object is mutable), whereas “+” makes a new list:
>>> a0 = []
>>> a = a0
>>> a += [17]
>>> a0 is a
True
>>> a0
[17]
>>> b0 = []
>>> b = b0
>>> b = b + [17]
>>> b0 is b
False
>>> b0
[]