mirror of https://github.com/python/cpython
#16128: clarify that instances of user-defined classes compare equal with themselves.
This commit is contained in:
parent
d65e2bab3b
commit
139e445270
|
@ -330,7 +330,8 @@ Glossary
|
||||||
All of Python's immutable built-in objects are hashable, while no mutable
|
All of Python's immutable built-in objects are hashable, while no mutable
|
||||||
containers (such as lists or dictionaries) are. Objects which are
|
containers (such as lists or dictionaries) are. Objects which are
|
||||||
instances of user-defined classes are hashable by default; they all
|
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`.
|
||||||
|
|
||||||
IDLE
|
IDLE
|
||||||
An Integrated Development Environment for Python. IDLE is a basic editor
|
An Integrated Development Environment for Python. IDLE is a basic editor
|
||||||
|
|
Loading…
Reference in New Issue