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
9241060c
Commit
9241060c
authored
Dec 23, 2002
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't rebind True and False.
parent
18397a96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Lib/test/test_iter.py
Lib/test/test_iter.py
+5
-5
No files found.
Lib/test/test_iter.py
View file @
9241060c
...
...
@@ -329,8 +329,8 @@ class TestCase(unittest.TestCase):
self
.
truth
=
truth
def
__nonzero__
(
self
):
return
self
.
truth
True
=
Boolean
(
1
)
False
=
Boolean
(
0
)
b
True
=
Boolean
(
1
)
b
False
=
Boolean
(
0
)
class
Seq
:
def
__init__
(
self
,
*
args
):
...
...
@@ -351,9 +351,9 @@ class TestCase(unittest.TestCase):
raise
StopIteration
return
SeqIter
(
self
.
vals
)
seq
=
Seq
(
*
([
True
,
False
]
*
25
))
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
seq
),
[
False
]
*
25
)
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
iter
(
seq
)),
[
False
]
*
25
)
seq
=
Seq
(
*
([
bTrue
,
b
False
]
*
25
))
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
seq
),
[
b
False
]
*
25
)
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
iter
(
seq
)),
[
b
False
]
*
25
)
# Test max() and min()'s use of iterators.
def
test_builtin_max_min
(
self
):
...
...
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