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

2013-06-01 Thread Andy Chugunov
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 h

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

2013-05-17 Thread Andy Chugunov
Andy Chugunov added the comment: Thank you for the clarification! The exception is appropriate as tuples have to stay immutable. Got it. Could you please also explain a bit about the append() call? Should it in theory raise an exception as well or is such clean behavior intended

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

2013-05-14 Thread Andy Chugunov
New submission from Andy Chugunov: At the same time append() succeeds silently, while simple '+' fails. Here's an example: >>> a = ([1],) >>> a[0].append(2) >>> a ([1, 2],) >>> a[0] += [3] Traceback (most recent call last): File ""