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
972fb077
Commit
972fb077
authored
Mar 03, 2008
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependency on itertools -- a simple genexp suffices.
parent
8e67ef52
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Lib/_abcoll.py
Lib/_abcoll.py
+2
-2
No files found.
Lib/_abcoll.py
View file @
972fb077
...
@@ -9,7 +9,6 @@ bootstrapping issues. Unit tests are in test_collections.
...
@@ -9,7 +9,6 @@ bootstrapping issues. Unit tests are in test_collections.
"""
"""
from
abc
import
ABCMeta
,
abstractmethod
from
abc
import
ABCMeta
,
abstractmethod
import
itertools
__all__
=
[
"Hashable"
,
"Iterable"
,
"Iterator"
,
__all__
=
[
"Hashable"
,
"Iterable"
,
"Iterator"
,
"Sized"
,
"Container"
,
"Callable"
,
"Sized"
,
"Container"
,
"Callable"
,
...
@@ -189,7 +188,8 @@ class Set(Sized, Iterable, Container):
...
@@ -189,7 +188,8 @@ class Set(Sized, Iterable, Container):
def
__or__
(
self
,
other
):
def
__or__
(
self
,
other
):
if
not
isinstance
(
other
,
Iterable
):
if
not
isinstance
(
other
,
Iterable
):
return
NotImplemented
return
NotImplemented
return
self
.
_from_iterable
(
itertools
.
chain
(
self
,
other
))
chain
=
(
e
for
s
in
(
self
,
other
)
for
e
in
s
)
return
self
.
_from_iterable
(
chain
)
def
__sub__
(
self
,
other
):
def
__sub__
(
self
,
other
):
if
not
isinstance
(
other
,
Set
):
if
not
isinstance
(
other
,
Set
):
...
...
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