Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
cae330e4
Kaydet (Commit)
cae330e4
authored
Ara 23, 2002
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't rebind True and False.
üst
9c8a0866
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
test_iter.py
Lib/test/test_iter.py
+5
-5
No files found.
Lib/test/test_iter.py
Dosyayı görüntüle @
cae330e4
...
@@ -329,8 +329,8 @@ class TestCase(unittest.TestCase):
...
@@ -329,8 +329,8 @@ class TestCase(unittest.TestCase):
self
.
truth
=
truth
self
.
truth
=
truth
def
__nonzero__
(
self
):
def
__nonzero__
(
self
):
return
self
.
truth
return
self
.
truth
True
=
Boolean
(
1
)
b
True
=
Boolean
(
1
)
False
=
Boolean
(
0
)
b
False
=
Boolean
(
0
)
class
Seq
:
class
Seq
:
def
__init__
(
self
,
*
args
):
def
__init__
(
self
,
*
args
):
...
@@ -351,9 +351,9 @@ class TestCase(unittest.TestCase):
...
@@ -351,9 +351,9 @@ class TestCase(unittest.TestCase):
raise
StopIteration
raise
StopIteration
return
SeqIter
(
self
.
vals
)
return
SeqIter
(
self
.
vals
)
seq
=
Seq
(
*
([
True
,
False
]
*
25
))
seq
=
Seq
(
*
([
bTrue
,
b
False
]
*
25
))
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
seq
),
[
False
]
*
25
)
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
seq
),
[
b
False
]
*
25
)
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
iter
(
seq
)),
[
False
]
*
25
)
self
.
assertEqual
(
filter
(
lambda
x
:
not
x
,
iter
(
seq
)),
[
b
False
]
*
25
)
# Test max() and min()'s use of iterators.
# Test max() and min()'s use of iterators.
def
test_builtin_max_min
(
self
):
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