Torsten Mohr schrieb:
reading the documentation (and also from a hint from this NG)
i know now that there are some types that are not mutable.

But why is it this way?

Immutable types (e.g. strings, tuples) allow for code optimization in some situations and can be used as dictionary keys. For the latter reason see:

http://www.python.org/moin/DictionaryKeys

--
-------------------------------------------------------------------
Peter Maas,  M+R Infosysteme,  D-52070 Aachen,  Tel +49-241-93878-0
E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
-------------------------------------------------------------------
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to