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
eabfe8cc
Kaydet (Commit)
eabfe8cc
authored
Haz 28, 2015
tarafından
Jason R. Coombs
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20387: Backport fix from Python 3.4
üst
33b24f5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
tokenize.py
Lib/tokenize.py
+17
-0
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/tokenize.py
Dosyayı görüntüle @
eabfe8cc
...
...
@@ -198,6 +198,8 @@ class Untokenizer:
def
untokenize
(
self
,
iterable
):
it
=
iter
(
iterable
)
indents
=
[]
startline
=
False
for
t
in
it
:
if
len
(
t
)
==
2
:
self
.
compat
(
t
,
it
)
...
...
@@ -205,6 +207,21 @@ class Untokenizer:
tok_type
,
token
,
start
,
end
,
line
=
t
if
tok_type
==
ENDMARKER
:
break
if
tok_type
==
INDENT
:
indents
.
append
(
token
)
continue
elif
tok_type
==
DEDENT
:
indents
.
pop
()
self
.
prev_row
,
self
.
prev_col
=
end
continue
elif
tok_type
in
(
NEWLINE
,
NL
):
startline
=
True
elif
startline
and
indents
:
indent
=
indents
[
-
1
]
if
start
[
1
]
>=
len
(
indent
):
self
.
tokens
.
append
(
indent
)
self
.
prev_col
=
len
(
indent
)
startline
=
False
self
.
add_whitespace
(
start
)
self
.
tokens
.
append
(
token
)
self
.
prev_row
,
self
.
prev_col
=
end
...
...
Misc/NEWS
Dosyayı görüntüle @
eabfe8cc
...
...
@@ -30,6 +30,9 @@ Core and Builtins
Library
-------
- Issue #20387: Restore semantic round-trip correctness in tokenize/untokenize
for tab-indented blocks.
- Issue #24456: Fixed possible buffer over-read in adpcm2lin() and lin2adpcm()
functions of the audioop module. Fixed SystemError when the state is not a
tuple. Fixed possible memory leak.
...
...
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