As Fredrik suggests, consult the source to find out.  Almost all of this
is in the realm of being an implementation detail, and hashes aren't
guaranteed to be the same from version to version or machine to machine.
I'm not even sure they're guaranteed to be the same from run to run.

Here's an example:

On a 32-bit linux machine running python 2.3:
$ python -c 'print hash("a" * 1000)'
-884397280

On a 64-bit linux machine running python 2.4:
$ python -c 'print hash("a" * 1000)'
2513399373082733344

A little more research suggests that, at least for strings, the hashing
algrithm is unchanged from 1.5.2 to 2.4, but is dependant on the range of a
platform 'long'.

Jeff

Attachment: pgpIPqBnSQiwT.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to