]> granicus.if.org Git - python/commitdiff
note that the hash of an arbitrary object is only derived from its address (closes...
authorBenjamin Peterson <benjamin@python.org>
Fri, 4 Apr 2014 13:58:13 +0000 (09:58 -0400)
committerBenjamin Peterson <benjamin@python.org>
Fri, 4 Apr 2014 13:58:13 +0000 (09:58 -0400)
Patch from Armin Rigo.

Doc/reference/datamodel.rst

index f4e3d63c29388c2a4034ff859533782342fe2feb..e07672983a119be1c226b7bd9a60a0175578440f 100644 (file)
@@ -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