I need to compute a hash that needs to be stable across architectures. Is python’s hash() stable?
To be more specific, the example below shows hash() computing the same value on two different hosts/architectures:
# on OSX based laptop
>>> hash((1,2,3,4))
485696759010151909
# on x86_64 Linux host
>>> hash((1,2,3,4))
485696759010151909
The above is true for at least those inputs, but my question is for the general case
If you need a well defined hash, you can use one out of hashlib.