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
bb6c0aae
Kaydet (Commit)
bb6c0aae
authored
Kas 23, 2014
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
PEP 479: Use the return-keyword instead of raising StopIteration inside a generators.
üst
828d932a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
7 deletions
+4
-7
ipaddress.py
Lib/ipaddress.py
+1
-1
mailbox.py
Lib/mailbox.py
+1
-1
test_buffer.py
Lib/test/test_buffer.py
+1
-1
test_collections.py
Lib/test/test_collections.py
+1
-1
test_itertools.py
Lib/test/test_itertools.py
+0
-2
test_sys_setprofile.py
Lib/test/test_sys_setprofile.py
+0
-1
No files found.
Lib/ipaddress.py
Dosyayı görüntüle @
bb6c0aae
...
...
@@ -808,7 +808,7 @@ class _BaseNetwork(_IPAddressBase):
other
.
broadcast_address
<=
self
.
broadcast_address
):
raise
ValueError
(
'
%
s not contained in
%
s'
%
(
other
,
self
))
if
other
==
self
:
r
aise
StopIteratio
n
r
etur
n
# Make sure we're comparing the network of other.
other
=
other
.
__class__
(
'
%
s/
%
s'
%
(
other
.
network_address
,
...
...
Lib/mailbox.py
Dosyayı görüntüle @
bb6c0aae
...
...
@@ -1949,7 +1949,7 @@ class _ProxyFile:
while
True
:
line
=
self
.
readline
()
if
not
line
:
r
aise
StopIteratio
n
r
etur
n
yield
line
def
tell
(
self
):
...
...
Lib/test/test_buffer.py
Dosyayı görüntüle @
bb6c0aae
...
...
@@ -216,7 +216,7 @@ def iter_format(nitems, testobj='ndarray'):
for
t
in
iter_mode
(
nitems
,
testobj
):
yield
t
if
testobj
!=
'ndarray'
:
r
aise
StopIteratio
n
r
etur
n
yield
struct_items
(
nitems
,
testobj
)
...
...
Lib/test/test_collections.py
Dosyayı görüntüle @
bb6c0aae
...
...
@@ -511,7 +511,7 @@ class TestOneTrickPonyABCs(ABCTestCase):
class
NextOnly
:
def
__next__
(
self
):
yield
1
r
aise
StopIteratio
n
r
etur
n
self
.
assertNotIsInstance
(
NextOnly
(),
Iterator
)
def
test_Sized
(
self
):
...
...
Lib/test/test_itertools.py
Dosyayı görüntüle @
bb6c0aae
...
...
@@ -1803,8 +1803,6 @@ class RegressionTests(unittest.TestCase):
hist
.
append
(
3
)
yield
2
hist
.
append
(
4
)
if
x
:
raise
StopIteration
hist
=
[]
self
.
assertRaises
(
AssertionError
,
list
,
chain
(
gen1
(),
gen2
(
False
)))
...
...
Lib/test/test_sys_setprofile.py
Dosyayı görüntüle @
bb6c0aae
...
...
@@ -260,7 +260,6 @@ class ProfileHookTestCase(TestCaseBase):
def
f
():
for
i
in
range
(
2
):
yield
i
raise
StopIteration
def
g
(
p
):
for
i
in
f
():
pass
...
...
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