No actually, in normal python, the two are very different.
The first one calls __iadd__ on a and that’s it.
The second calls __add__ and assign the result back to the variable named a.
So pytorch respects this convention of th first one changing the Tensor inplace while the second does not.