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
b8940393
Commit
b8940393
authored
Aug 25, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gave __sub__/difference a factor of 2-5 speed boost.
parent
334b4a5c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Lib/sets.py
Lib/sets.py
+2
-1
No files found.
Lib/sets.py
View file @
b8940393
...
@@ -223,9 +223,10 @@ class BaseSet(object):
...
@@ -223,9 +223,10 @@ class BaseSet(object):
return
NotImplemented
return
NotImplemented
result
=
self
.
__class__
()
result
=
self
.
__class__
()
data
=
result
.
_data
data
=
result
.
_data
otherdata
=
other
.
_data
value
=
True
value
=
True
for
elt
in
self
:
for
elt
in
self
:
if
elt
not
in
other
:
if
elt
not
in
other
data
:
data
[
elt
]
=
value
data
[
elt
]
=
value
return
result
return
result
...
...
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