Tuples and immutability

Ian Kelly ian.g.kelly at gmail.com
Sat Mar 1 00:26:07 EST 2014


On Fri, Feb 28, 2014 at 6:27 PM, Eric Jacoboni <eric.jacoboni at gmail.com> wrote:
> Anyway, the TypeError should rollback, not commit the mistake.

The Python interpreter isn't a database.  It can't rollback the object
because the operation that was performed may not be reversible.
Consider for example a socket class where the += operator is
overloaded to send a message on the socket.  The message can't be
unsent.



More information about the Python-list mailing list