don't need dictionary's keys - hash table?

Paul Rubin http
Thu Jul 13 01:54:27 EDT 2006


Ganesan Rajagopal <rganesan at myrealbox.com> writes:
> hash is a number. It's sufficient to do
> 
> while d.has_key(key):
>     key += 1

This is called linear probing and is not considered that great a
collision resolution strategy for hash tables.  Really, if you want an
exhaustive study about hashing, see Knuth vol 3.  If you're just
trying to get the application doing something reasonable, let the
database do its job.



More information about the Python-list mailing list