I was told that += can have different effects than the standard notation of i = i +. Is there a case in which i += 1 would be differen
+=
i = i +
i += 1
Here is an example that directly compares i += x with i = i + x:
i += x
i = i + x
def foo(x): x = x + [42] def bar(x): x += [42] c = [27] foo(c); # c is not changed bar(c); # c is changed to [27, 42]