Message17838
http://python.org/doc/tut/node7.html#SECTION007400000000000000000
The tutorial section 5.4 ("Dictionaries") says, "Unlike
sequences, which are indexed by a range of numbers,
dictionaries are indexed by keys, which can be any
immutable type; strings and numbers can always be
keys." This strongly implies that only immutable
objects may be keys, and I always assumed that to be
the case. I have recently learned that is not true.
I would suggest a change along the lines of "which can
be any immutable type or mutuable types under some
circumstances," with a link to further elaboration on
what is required for a type to be hashable. |
|
Date |
User |
Action |
Args |
2007-08-23 14:16:13 | admin | link | issue791397 messages |
2007-08-23 14:16:13 | admin | create | |
|