hash() yields different results for different platforms
Kerry, Richard
richard.kerry at siemens.com
Wed Jul 12 06:11:28 EDT 2006
The hash is not expected to be unique, it just provides a starting point
for another search (usually linear ?).
See http://en.wikipedia.org/wiki/Hash_function
Helpfully,
Maybe,
Richard.
-----Original Message-----
From: python-list-bounces+richard.kerry=siemens.com at python.org
[mailto:python-list-bounces+richard.kerry=siemens.com at python.org] On
Behalf Of Piet van Oostrum
Sent: 12 July 2006 10:56
To: python-list at python.org
Subject: Re: hash() yields different results for different platforms
>>>>> Grant Edwards <grante at visi.com> (GE) wrote:
>GE> The low 32 bits match, so perhaps you should just use that
>GE> portion of the returned hash?
If the hashed should be unique, 32 bits is much too low if you have
millions of entries.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list