Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4dd27a3

Browse files
committed
Closes #21782: the default hash(x) is not exactly id(x) but derived from it.
1 parent a94ad1e commit 4dd27a3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/glossary.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ Glossary
355355
All of Python's immutable built-in objects are hashable, while no mutable
356356
containers (such as lists or dictionaries) are. Objects which are
357357
instances of user-defined classes are hashable by default; they all
358-
compare unequal (except with themselves), and their hash value is their
359-
:func:`id`.
358+
compare unequal (except with themselves), and their hash value is derived
359+
from their :func:`id`.
360360

361361
IDLE
362362
An Integrated Development Environment for Python. IDLE is a basic editor

0 commit comments

Comments
 (0)