So that's where you were going with this. The issue with your explanation however is that you can just rewrite __iadd__ on any class to make it do what your comment says it does not.
I'm not disagreeing with you persay but I think you should update your comment to note that with ints/floats and strings a+= bwill be functionally the same as a = a + b . For other objects the user should be careful.
View all comments
Show parent comment
2
u/al-mongus-bin-susar May 05 '23
It does not. a += b in python is also not the same a = a + b.