Message 230400 - Python tracker (original) (raw)
Note, the += operation is conceptually similar to update() methods with are usually duck typeable:
d = {} d.update(1) Traceback (most recent call last): File "<pyshell#16>", line 1, in d.update(1) TypeError: 'int' object is not iterable
s = set() s.update(1) Traceback (most recent call last): File "<pyshell#18>", line 1, in s.update(1) TypeError: 'int' object is not iterable
dict(1) Traceback (most recent call last): File "<pyshell#19>", line 1, in dict(1) TypeError: 'int' object is not iterable