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
52e86ad0
Kaydet (Commit)
52e86ad0
authored
Haz 28, 1998
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Speed-up unquote(), inspired by post from Daniel Walton.
üst
002f7aae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
18 deletions
+16
-18
urllib.py
Lib/urllib.py
+16
-18
No files found.
Lib/urllib.py
Dosyayı görüntüle @
52e86ad0
...
...
@@ -854,25 +854,23 @@ def splitgophertype(selector):
return
selector
[
1
],
selector
[
2
:]
return
None
,
selector
_quoteprog
=
None
def
unquote
(
s
):
global
_quoteprog
if
_quoteprog
is
None
:
import
re
_quoteprog
=
re
.
compile
(
'
%
[0-9a-fA-F][0-9a-fA-F]'
)
i
=
0
n
=
len
(
s
)
res
=
[]
while
0
<=
i
<
n
:
match
=
_quoteprog
.
search
(
s
,
i
)
if
not
match
:
res
.
append
(
s
[
i
:])
break
j
=
match
.
start
(
0
)
res
.
append
(
s
[
i
:
j
]
+
chr
(
string
.
atoi
(
s
[
j
+
1
:
j
+
3
],
16
)))
i
=
j
+
3
return
string
.
joinfields
(
res
,
''
)
mychr
=
chr
myatoi
=
string
.
atoi
list
=
string
.
split
(
s
,
'
%
'
)
res
=
[
list
[
0
]]
myappend
=
res
.
append
del
list
[
0
]
for
item
in
list
:
if
item
[
1
:
2
]:
try
:
myappend
(
mychr
(
myatoi
(
item
[:
2
],
16
))
+
item
[
2
:])
except
:
myappend
(
item
)
else
:
myappend
(
item
)
return
string
.
join
(
res
,
""
)
def
unquote_plus
(
s
):
if
'+'
in
s
:
...
...
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