On 23 Apr 2007 17:19:15 +0200, Neil Cerutti <[EMAIL PROTECTED]> wrote:
> So the question becomes: Why do Python dictionaries require keys
> to be of an immutable type?

Dictionary keys are hashed values.  If you change the key, you change
the hash and lose the pointer to the referenced object.

Or:  Because.  ;-)

Chris
-- 
"A little government and a little luck are necessary in life, but only
a fool trusts either of them." -- P. J. O'Rourke
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to