User-defined class instance objects (discussed in Part VI) can also be used as keys, as long as they have the proper protocol methods; roughly, they need to tell Python that their values are “hashable” and thus won’t change, as otherwise they would be useless as fixed keys. Mutable objects such as lists, sets, and other dictionaries don’t work as keys, but are allowed as values.
Important point regarding what can be made a key in Python dictionary. They should be IMMUTABLE!!!
Share this highlighthttp://www.safaribooksonline.com/a/learning-python-5th/29651/