python hash() function

Christian Heimes lists at cheimes.de
Tue Mar 25 22:33:43 EDT 2008


Alvin Delagon schrieb:
> Hello,
> 
>>>> hash("foobar")
> -1969371895
> 
> Anyone can explain to me how the hash() function in python does its work? A
> link to its source could help me a lot also. I'm looking for a way to
> replicate this function in php. Thanks in advance.

The code is in Objects/stringobject.c:string_hash()

Christian




More information about the Python-list mailing list