The reason for this is that +=, and +causes the two different methods of a class, __iadd__method , and __add__.
API , iadd ( , ), . , iadd , .
i = 1
i += 1
, i. "" - . + = 1 = + 1. , , :
:
a = [1, 2, 3]
b = a
b += [1, 2, 3]
print a
print b
:
a = [1, 2, 3]
b = a
b = b + [1, 2, 3]
print a
print b
, , b , + = b, b ( , ). , ). , , b = b + [1, 2, 3], , b [1, 2, 3]. b - , b - .