Python Strings

Jonadab the Unsightly One jonadab at bright.net
Tue Sep 5 13:16:18 CEST 2000


Richard Chamberlain <richard_chamberlain at ntlworld.com> wrote:

> strings are immutable so you don't have to worry about putting const in
> front of them ;-)
> 
> immutable types in python are useful for dictionaries essentially. For a
> hashtable to be efficient it requires an unchanging key, so strings fit
> this bill.

So, a Python string is essentially a dictionary word, then?  

Weird.  Coming from a language (Inform) which has separate 
data types for strings and dictionary words, BOTH of which
are immutable, I'm starting to get curious about the other
features of Python strings...  time to leave the ng and 
start reading the docs, I suppose...

- jonadab



More information about the Python-list mailing list