summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst13
1 files changed, 9 insertions, 4 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 3d239ec..a37d496 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -587,11 +587,16 @@ are always available. They are listed here in alphabetical order.
.. function:: hash(object)
- Return the hash value of the object (if it has one). Hash values are integers.
- They are used to quickly compare dictionary keys during a dictionary lookup.
- Numeric values that compare equal have the same hash value (even if they are of
- different types, as is the case for 1 and 1.0).
+ Return the hash value of the object (if it has one). Hash values are
+ integers. They are used to quickly compare dictionary keys during a
+ dictionary lookup. Numeric values that compare equal have the same hash
+ value (even if they are of different types, as is the case for 1 and 1.0).
+ .. note::
+
+ For object's with custom :meth:`__hash__` methods, note that :func:`hash`
+ truncates the return value based on the bit width of the host machine.
+ See :meth:`__hash__` for details.
.. function:: help([object])