Antoon Pardon a écrit :
Op 2005-01-08, Bruno Desthuilliers schreef <[EMAIL PROTECTED]>:

worzel a écrit :

I get what the difference is between a tuple and a list, but why would I ever care about the tuple's immuutability?

Because, from a purely pratical POV, only an immutable object can be used as kay in a dict.

<my-bad> s/kay/key/ </my-bad>

This is not true.

Chapter and verse, please ?


So you can use tuples for 'composed key'.

lists can be so used too. Just provide a hash.

Please show us an example, and let's see how useful and handy this is from a "purely practical POV" ?-)


Bruno
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to