From: Benjamin Peterson Date: Fri, 4 Apr 2014 13:58:13 +0000 (-0400) Subject: note that the hash of an arbitrary object is only derived from its address (closes... X-Git-Tag: v2.7.7rc1~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b41299e4985b4850e590bbf414ff6cf559a873a9;p=python note that the hash of an arbitrary object is only derived from its address (closes #21154) Patch from Armin Rigo. --- 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