From b41299e4985b4850e590bbf414ff6cf559a873a9 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 4 Apr 2014 09:58:13 -0400 Subject: [PATCH] note that the hash of an arbitrary object is only derived from its address (closes #21154) Patch from Armin Rigo. --- Doc/reference/datamodel.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index f4e3d63c29..e07672983a 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1422,7 +1422,7 @@ Basic customization User-defined classes have :meth:`__cmp__` and :meth:`__hash__` methods by default; with them, all objects compare unequal (except with themselves) - and ``x.__hash__()`` returns ``id(x)``. + and ``x.__hash__()`` returns a result derived from ``id(x)``. Classes which inherit a :meth:`__hash__` method from a parent class but change the meaning of :meth:`__cmp__` or :meth:`__eq__` such that the hash -- 2.50.1