New submission from Giacomo Alzetta:

The documentation for hashable in the glossary 
(https://docs.python.org/3.4/reference/datamodel.html#object.__hash__) is 
incorrect:

they all compare unequal (except with themselves), **and their hash value is 
their id().**

It is *not* true that their hash is their id (see relevant SO question: 
http://stackoverflow.com/questions/24249729/user-defined-class-hash-and-id-and-doc)

Also the documentation for __hash__ 
(https://docs.python.org/3.4/reference/datamodel.html#object.__hash__) doesn't 
even mention id().

----------
assignee: docs@python
components: Documentation
messages: 220746
nosy: Giacomo.Alzetta, docs@python
priority: normal
severity: normal
status: open
title: hashable documentation error: shouldn't mention id
type: enhancement
versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21782>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to