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
f8abb387
Kaydet (Commit)
f8abb387
authored
Agu 26, 1996
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Slightly faster (un)quoting.
üst
f480c674
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
urllib.py
Lib/urllib.py
+8
-8
No files found.
Lib/urllib.py
Dosyayı görüntüle @
f8abb387
...
@@ -642,26 +642,26 @@ _quoteprog = regex.compile('%[0-9a-fA-F][0-9a-fA-F]')
...
@@ -642,26 +642,26 @@ _quoteprog = regex.compile('%[0-9a-fA-F][0-9a-fA-F]')
def
unquote
(
s
):
def
unquote
(
s
):
i
=
0
i
=
0
n
=
len
(
s
)
n
=
len
(
s
)
res
=
''
res
=
[]
while
0
<=
i
<
n
:
while
0
<=
i
<
n
:
j
=
_quoteprog
.
search
(
s
,
i
)
j
=
_quoteprog
.
search
(
s
,
i
)
if
j
<
0
:
if
j
<
0
:
res
=
res
+
s
[
i
:]
res
.
append
(
s
[
i
:])
break
break
res
=
res
+
(
s
[
i
:
j
]
+
chr
(
string
.
atoi
(
s
[
j
+
1
:
j
+
3
],
16
)))
res
.
append
(
s
[
i
:
j
]
+
chr
(
string
.
atoi
(
s
[
j
+
1
:
j
+
3
],
16
)))
i
=
j
+
3
i
=
j
+
3
return
res
return
string
.
joinfields
(
res
,
''
)
always_safe
=
string
.
letters
+
string
.
digits
+
'_,.-'
always_safe
=
string
.
letters
+
string
.
digits
+
'_,.-'
def
quote
(
s
,
safe
=
'/'
):
def
quote
(
s
,
safe
=
'/'
):
safe
=
always_safe
+
safe
safe
=
always_safe
+
safe
res
=
''
res
=
[]
for
c
in
s
:
for
c
in
s
:
if
c
in
safe
:
if
c
in
safe
:
res
=
res
+
c
res
.
append
(
c
)
else
:
else
:
res
=
res
+
'
%%%02
x'
%
ord
(
c
)
res
.
append
(
'
%%%02
x'
%
ord
(
c
)
)
return
res
return
string
.
joinfields
(
res
,
''
)
# Proxy handling
# Proxy handling
...
...
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