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
d06d0304
Commit
d06d0304
authored
Aug 23, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comment repair.
parent
2023c9b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Lib/sets.py
Lib/sets.py
+4
-4
No files found.
Lib/sets.py
View file @
d06d0304
...
...
@@ -297,10 +297,10 @@ class BaseSet(object):
def
_compute_hash
(
self
):
# Calculate hash code for a set by xor'ing the hash codes of
# the elements. This
algorithm ensures that the hash code
#
does not depend on the order in which elements are added to
#
the code. This is not called __hash__ because a BaseSet
#
should not be hashable;
only an ImmutableSet is hashable.
# the elements. This
ensures that the hash code does not depend
#
on the order in which elements are added to the set. This is
#
not called __hash__ because a BaseSet should not be hashable;
# only an ImmutableSet is hashable.
result
=
0
for
elt
in
self
:
result
^=
hash
(
elt
)
...
...
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