Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cc1c582f
Commit
cc1c582f
authored
May 27, 2019
by
Raymond Hettinger
Committed by
GitHub
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37051: Refine note on what objects are hashable (GH-13587)
parent
02db6967
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Doc/glossary.rst
Doc/glossary.rst
+4
-2
No files found.
Doc/glossary.rst
View file @
cc1c582f
...
...
@@ -512,8 +512,10 @@ Glossary
Hashability
makes
an
object
usable
as
a
dictionary
key
and
a
set
member
,
because
these
data
structures
use
the
hash
value
internally
.
All
of
Python
's immutable built-in objects are hashable; mutable
containers (such as lists or dictionaries) are not. Objects which are
Most
of
Python
's immutable built-in objects are hashable; mutable
containers (such as lists or dictionaries) are not; immutable
containers (such as tuples and frozensets) are only hashable if
their elements are hashable. Objects which are
instances of user-defined classes are hashable by default. They all
compare unequal (except with themselves), and their hash value is derived
from their :func:`id`.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment