[Fwd: Re: [Tutor] Dictionaries]

Patrick K. O'Brien pobrien@orbtech.com
Mon, 12 Nov 2001 20:10:40 -0600


Dictionary data can be any type. It is only dictionary keys that must be
immutable/hashable.

---
Patrick K. O'Brien
Orbtech
"I am, therefore I think."

-----Original Message-----
From: tutor-admin@python.org [mailto:tutor-admin@python.org]On Behalf Of
Lloyd Hugh Allen
Sent: Monday, November 12, 2001 7:57 PM
To: tutor@python.org
Subject: [Fwd: Re: [Tutor] Dictionaries]

Darn "reply" instead of "reply-to-all"--still not used receiving the
list in not digest-form.

-------- Original Message --------
From: Lloyd Hugh Allen <vze2f978@mail.verizon.net>
Subject: Re: [Tutor] Dictionaries
To: Mike Yuen <myuen@ucalgary.ca>

Have you tried using the data as a tuple? Since tuples are immutable (or
hashable, or something like that), they're allowed to be dictionary
data. Your dictionary in the example below would be