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
454602f0
Commit
454602f0
authored
Aug 26, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gave intersection_update a speed boost.
parent
cd06eeb2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
Lib/sets.py
Lib/sets.py
+1
-3
No files found.
Lib/sets.py
View file @
454602f0
...
@@ -380,9 +380,7 @@ class Set(BaseSet):
...
@@ -380,9 +380,7 @@ class Set(BaseSet):
def
__iand__
(
self
,
other
):
def
__iand__
(
self
,
other
):
"""Update a set with the intersection of itself and another."""
"""Update a set with the intersection of itself and another."""
self
.
_binary_sanity_check
(
other
)
self
.
_binary_sanity_check
(
other
)
for
elt
in
self
.
_data
.
keys
():
self
.
_data
=
(
self
&
other
).
_data
if
elt
not
in
other
:
del
self
.
_data
[
elt
]
return
self
return
self
def
intersection_update
(
self
,
other
):
def
intersection_update
(
self
,
other
):
...
...
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