E
Eric Jacoboni
Hi,
I'm using Python 3.3 and i have a problem for which i've still not found
any reasonable explanation...
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
Ok... I accept this message as += is a reassignment of a_tuple[1] and a
tuple is immutable...
But, then, why a_tuple is still modified?
('spam', [10, 30, 20], 'eggs')
I get a TypeError for an illegal operation, but this operation is still
completed?
I'm using Python 3.3 and i have a problem for which i've still not found
any reasonable explanation...
Traceback (most recent call last):a_tuple = ("spam", [10, 30], "eggs")
a_tuple[1] += [20]
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
Ok... I accept this message as += is a reassignment of a_tuple[1] and a
tuple is immutable...
But, then, why a_tuple is still modified?
('spam', [10, 30, 20], 'eggs')
I get a TypeError for an illegal operation, but this operation is still
completed?