why are some types immutable?

Fredrik Lundh fredrik at pythonware.com
Mon Jan 17 03:42:21 EST 2005


Roy Smith wrote:

> But, in a nutshell, the biggest reason for immutable types (tuples and
> strings) is that this lets they be dictionary keys.

if you think that's the biggest reason, you haven't spent enough time working
on high-performance Python code and extensions (there's a reason why some
languages adopt a "you can only assign to a variable once" approach).

</F> 






More information about the Python-list mailing list