Tuples and immutability

Mark H. Harris harrismh777 at gmail.com
Sat Mar 1 07:25:50 CET 2014

On Friday, February 28, 2014 11:16:18 PM UTC-6, Ian wrote:

> How would you propose doing that?  Bear in mind that while Python
> knows that tuples specifically are immutable, it doesn't generally
> know whether a type is immutable.  

I was going to bed, and then thought of the solution.  Allow the action.

Hold the error pending until the action either succeeds or fails for the "item," in this case a list, and then post the error for the tuple depending... this would make the whole mess consistent, and even compatible with the idea of dynamic name and type binding...

So, in other words, the action should be permitted, and actually was allowed, and the message is incorrectly reporting something that for this particular "item" is NOT true. The error message (and timing of same) is the bug  (philosophically).

Under the covers it may be (and probably is) more complicated.

Good night everyone.


More information about the Python-list mailing list