Tuples and immutability
Eric Jacoboni
eric.jacoboni at gmail.com
Thu Feb 27 11:27:12 EST 2014
Le 27/02/2014 17:13, Zachary Ware a écrit :
>
> You're not the first person to have this question :)
>
> http://docs.python.org/3/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works
>
Oh yes, i was aware of this explanation (thanks to Chris for his answer,
too)... and that's why i wrote "reasonable" :)
I know i should use append() or extend() and i understand the tricky
implications of += in this context. But, imho, it's far from being a
intuitive result, to say the least.
More information about the Python-list
mailing list