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
81dd8b95
Kaydet (Commit)
81dd8b95
authored
Kas 14, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use some more itertools magic to make '' be yielded after readline is done
üst
21db77e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
tokenize.py
Lib/tokenize.py
+4
-3
No files found.
Lib/tokenize.py
Dosyayı görüntüle @
81dd8b95
...
...
@@ -379,10 +379,11 @@ def tokenize(readline):
"""
# This import is here to avoid problems when the itertools module is not
# built yet and tokenize is imported.
from
itertools
import
chain
from
itertools
import
chain
,
repeat
encoding
,
consumed
=
detect_encoding
(
readline
)
rl_iter
=
iter
(
readline
,
""
)
return
_tokenize
(
chain
(
consumed
,
rl_iter
)
.
__next__
,
encoding
)
rl_gen
=
iter
(
readline
,
b
""
)
empty
=
repeat
(
b
""
)
return
_tokenize
(
chain
(
consumed
,
rl_gen
,
empty
)
.
__next__
,
encoding
)
def
_tokenize
(
readline
,
encoding
):
...
...
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