[issue17973] FAQ entry for: '+=' on a list inside tuple both succeeds and raises an exception

Andy Chugunov report at bugs.python.org
Sat Jun 1 09:14:28 CEST 2013


Andy Chugunov added the comment:

Thank you guys for all the efforts you put in solving and answering this.

Just so that we're clear.
It is perfectly legitimate to extend lists withing tuples. It just doesn't seem possible to make augmented assignment and simple assignment handle this particular operation correctly without unduly sacrificing their general efficiency. Use append() on the lists instead.

Is that correct?

----------

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


More information about the Python-bugs-list mailing list