[Python-checkins] cpython (3.4): Closes #21782: the default hash(x) is not exactly id(x) but derived from it.

georg.brandl python-checkins at python.org
Mon Oct 6 16:49:05 CEST 2014


https://hg.python.org/cpython/rev/bfaf434a6f10
changeset: 92852:bfaf434a6f10
branch: 3.4
parent: 92848:8c33440d1f64
user: Georg Brandl <georg at python.org>
date: Mon Oct 06 16:45:23 2014 +0200
summary:
 Closes #21782: the default hash(x) is not exactly id(x) but derived from it.
files:
 Doc/glossary.rst | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -355,8 +355,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 (except with themselves), and their hash value is their
- :func:`id`.
+ compare unequal (except with themselves), and their hash value is derived
+ from their :func:`id`.
 
 IDLE
 An Integrated Development Environment for Python. IDLE is a basic editor
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /