[Tutor] Hashing

Allan Crooks allan.crooks@btinternet.com
Sat, 11 Aug 2001 01:08:40 +0100


Hi,

Does anyone know exactly how the hash method derives a hash 
for tuples? Or strings?

>>> a, b, c, d = (1,), (2,), (3,), (4,)
>>> map (hash, [a, b, c, d])
[-1660579480, -1660579477, -1660579478, -1660579475]

The above code does seem slightly bewildering to me, anyone got 
any ideas?

Allan.