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
d86e4c86
Kaydet (Commit)
d86e4c86
authored
Mar 06, 2011
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
only do this sys.stderr replacing on CPython
üst
81638f13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
pytree.py
Lib/lib2to3/pytree.py
+7
-4
No files found.
Lib/lib2to3/pytree.py
Dosyayı görüntüle @
d86e4c86
...
...
@@ -743,9 +743,11 @@ class WildcardPattern(BasePattern):
else
:
# The reason for this is that hitting the recursion limit usually
# results in some ugly messages about how RuntimeErrors are being
# ignored.
save_stderr
=
sys
.
stderr
sys
.
stderr
=
StringIO
()
# ignored. We only have to do this on CPython, though, because other
# implementations don't have this nasty bug in the first place.
if
hasattr
(
sys
,
"getrefcount"
):
save_stderr
=
sys
.
stderr
sys
.
stderr
=
StringIO
()
try
:
for
count
,
r
in
self
.
_recursive_matches
(
nodes
,
0
):
if
self
.
name
:
...
...
@@ -759,7 +761,8 @@ class WildcardPattern(BasePattern):
r
[
self
.
name
]
=
nodes
[:
count
]
yield
count
,
r
finally
:
sys
.
stderr
=
save_stderr
if
hasattr
(
sys
,
"getrefcount"
):
sys
.
stderr
=
save_stderr
def
_iterative_matches
(
self
,
nodes
):
"""Helper to iteratively yield the matches."""
...
...
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