T
Terry Reedy
* Terry Reedy:Traceback (most recent call last):* Alf P. Steinbach:* Aahz:and sometimes
they rebind the original target to the same object.
At the Python level that seems to be an undetectable null-operation.
If you try t=(1,2,3); t[1]+=3, if very much matters that a rebind occurs.
Testing:
t = ([], [], [])
t ([], [], [])
t[0] += ["blah"]
</test>File said:t (['blah'], [], [])
_
Yep, it matters.
So one should instead write t[0].extend('blah') to the same effect, but
without the exception raising assignment attempt, when that is what one
really means ;-).
Terry Jan Reedy