It&#x27;s quite obvious where it comes from though, it first calls __iadd__ on the list and that succeeds, and then it calls __setitem__ on the tuple which fails; however, the first operation already mutated the list.<p>This has nothing to do with tuples, I think, as one can constructs many other examples just like this one.