[Tutor] What does Python gain by having immutable types?

Sean Perry shaleh at speakeasy.net
Wed Mar 23 03:40:21 CET 2005

Tony C wrote:
> The list variable is the same object, and contains the sorted list, so
> why bother with the complexity of immutable types at all?

* only immutable objects can be dictionary keys
* specifically immutable strings are a performance optimization

More information about the Tutor mailing list