[issue16701] Docs missing the behavior of += (in-place add) for lists.

Martin Panter report at bugs.python.org
Thu Sep 24 23:20:53 CEST 2015


Martin Panter added the comment:

The “s += t” operation assigns the result back to s. So it could involve an extra __setattr__()/__setitem__() call, or an exception trying to modify a tuple item, etc. The extend() and slice assignment versions don’t have this extra stage.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16701>
_______________________________________


More information about the Python-bugs-list mailing list