Ronald Oussoren added the comment:

This is a side effect to the way the in place operators work.

Basically "a[0] += [3]" is evaluated as:

    a[0] = a[0].__iadd__([3])

The call to __iadd__ succeeds, which is why the list is updated, but you get an 
exception when the interpreter tries to update item 0 of the tuple.

----------
nosy: +ronaldoussoren

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to