On Sat, Jan 30, 2010 at 4:56 AM, spir <denis.s...@free.fr> wrote: > I'm surprised of this, for this should create as many indexes (in the > underlying array actually holding the values) as there are integer keys. With > possibly huge holes in the array. Actually, there will certainly be a > predefined number of indexes N, and the integers be further "modulo-ed" N. Or > what? > I would love to know how to sensibly chose the number of indexes. Pointers > welcome (my searches did not bring any clues on the topic).
Wikipedia has an extensive article on hash tables. For details of the Python implementation, there are many comments in the source: http://svn.python.org/view/python/trunk/Objects/dictobject.c?view=markup and more implementation notes here: http://svn.python.org/view/python/trunk/Objects/dictnotes.txt?view=markup Kent _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor