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
93149d93
Kaydet (Commit)
93149d93
authored
Nis 10, 2006
tarafından
Phillip J. Eby
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minor clarity edit to contextlib per Guido's request.
üst
2ba96610
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
contextlib.py
Lib/contextlib.py
+2
-2
No files found.
Lib/contextlib.py
Dosyayı görüntüle @
93149d93
...
@@ -31,11 +31,11 @@ class GeneratorContextManager(object):
...
@@ -31,11 +31,11 @@ class GeneratorContextManager(object):
try
:
try
:
self
.
gen
.
throw
(
type
,
value
,
traceback
)
self
.
gen
.
throw
(
type
,
value
,
traceback
)
raise
RuntimeError
(
"generator didn't stop after throw()"
)
raise
RuntimeError
(
"generator didn't stop after throw()"
)
except
StopIteration
:
except
StopIteration
,
exc
:
# Suppress the exception *unless* it's the same exception that
# Suppress the exception *unless* it's the same exception that
# was passed to throw(). This prevents a StopIteration
# was passed to throw(). This prevents a StopIteration
# raised inside the "with" statement from being suppressed
# raised inside the "with" statement from being suppressed
return
sys
.
exc_info
()[
1
]
is
not
value
return
exc
is
not
value
except
:
except
:
# only re-raise if it's *not* the exception that was
# only re-raise if it's *not* the exception that was
# passed to throw(), because __exit__() must not raise
# passed to throw(), because __exit__() must not raise
...
...
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