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
1ea8cb49
Kaydet (Commit)
1ea8cb49
authored
Ock 21, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#1726198: replace while 1: fp.readline() with file iteration.
üst
af67f303
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
14 deletions
+4
-14
formatter.py
Lib/formatter.py
+1
-4
keyword.py
Lib/keyword.py
+1
-3
urlparse.py
Lib/urlparse.py
+1
-3
ColorDB.py
Tools/pynche/ColorDB.py
+1
-4
No files found.
Lib/formatter.py
Dosyayı görüntüle @
1ea8cb49
...
...
@@ -432,10 +432,7 @@ def test(file = None):
fp
=
open
(
sys
.
argv
[
1
])
else
:
fp
=
sys
.
stdin
while
1
:
line
=
fp
.
readline
()
if
not
line
:
break
for
line
in
fp
:
if
line
==
'
\n
'
:
f
.
end_paragraph
(
1
)
else
:
...
...
Lib/keyword.py
Dosyayı görüntüle @
1ea8cb49
...
...
@@ -62,9 +62,7 @@ def main():
fp
=
open
(
iptfile
)
strprog
=
re
.
compile
(
'"([^"]+)"'
)
lines
=
[]
while
1
:
line
=
fp
.
readline
()
if
not
line
:
break
for
line
in
fp
:
if
'{1, "'
in
line
:
match
=
strprog
.
search
(
line
)
if
match
:
...
...
Lib/urlparse.py
Dosyayı görüntüle @
1ea8cb49
...
...
@@ -306,9 +306,7 @@ def test():
except
ImportError
:
from
StringIO
import
StringIO
fp
=
StringIO
(
test_input
)
while
1
:
line
=
fp
.
readline
()
if
not
line
:
break
for
line
in
fp
:
words
=
line
.
split
()
if
not
words
:
continue
...
...
Tools/pynche/ColorDB.py
Dosyayı görüntüle @
1ea8cb49
...
...
@@ -50,10 +50,7 @@ class ColorDB:
self
.
__byname
=
{}
# all unique names (non-aliases). built-on demand
self
.
__allnames
=
None
while
1
:
line
=
fp
.
readline
()
if
not
line
:
break
for
line
in
fp
:
# get this compiled regular expression from derived class
mo
=
self
.
_re
.
match
(
line
)
if
not
mo
:
...
...
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