March 2003
Intermediate to advanced
656 pages
39h 30m
English
hash
hash(obj)Returns the hash value for obj.
obj can be a dictionary key only if
obj can be hashed. All numbers that
compare equal have the same hash value, even if they are of different
types. If the type of obj does not define
equality comparison,
hash(
obj
)
returns
id(
obj
).
See also __hash__ in Chapter 5.