Mutated Tuples?

https://docs.python.org/3.6/faq/programming.html#why-does-a-tuple-i-item-raise-an-exception-when-the-addition-works The docs explain that a tuple throws an error but is assigned despite being immutable. The object pointed to stays the same and is mutated in place and when the result is reassigned the interpreter throws an error stating that an immutable cannot be modified yet the assignment is successful. This voodoo is beyond my reckoning!

Comments

Popular posts from this blog