The future of Python immutability

Terry Reedy tjreedy at udel.edu
Mon Sep 7 01:55:05 EDT 2009


Dennis Lee Bieber wrote:
> On Sun, 06 Sep 2009 20:29:47 -0700, John Nagle <nagle at animats.com>
> declaimed the following in gmane.comp.python.general:
> 
>>     Python has the advantage that a sizable fraction of its objects, especially
>> the very common ones like numbers and strings, are immutable.  Immutable objects
> 
> 	We must have different ideas of "sizable"
> 
> 	Numbers, strings, and tuples are immutable...
> 	Lists, dictionaries, and pretty much anything else (functions, class
> instances, etc.) are mutable in one way or another... I'd say the
> mutables are in the majority <G>

I think it depends on whether one counts classes or instances. Typical 
programs have a lot of numbers and strings.

tjr





More information about the Python-list mailing list