[Python-Dev] cpython (merge 3.3 -> default): #16128: merge with 3.3.

Antoine Pitrou solipsis at pitrou.net
Fri Feb 1 08:10:15 CET 2013


On Fri,  1 Feb 2013 04:20:46 +0100 (CET)
ezio.melotti <python-checkins at python.org> wrote:
> 
> diff --git a/Doc/glossary.rst b/Doc/glossary.rst
> --- a/Doc/glossary.rst
> +++ b/Doc/glossary.rst
> @@ -320,7 +320,8 @@
>        All of Python's immutable built-in objects are hashable, while no mutable
>        containers (such as lists or dictionaries) are.  Objects which are
>        instances of user-defined classes are hashable by default; they all
> -      compare unequal, and their hash value is their :func:`id`.
> +      compare unequal (except with themselves), and their hash value is their
> +      :func:`id`.

Python 3.3.0+ (3.3:127abd16168a, Sep 29 2012, 18:46:33) 
[GCC 4.5.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> o = object()
>>> hash(o) == id(o)
False


Regards

Antoine.




More information about the Python-Dev mailing list