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
0dee4ee0
Kaydet (Commit)
0dee4ee0
authored
Haz 09, 1999
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Updated lagging version#. Also added some comments about how quote()
and quote_plus() can be optimized tenfold.
üst
db23d3db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
urllib.py
Lib/urllib.py
+3
-1
No files found.
Lib/urllib.py
Dosyayı görüntüle @
0dee4ee0
...
@@ -27,7 +27,7 @@ import os
...
@@ -27,7 +27,7 @@ import os
import
sys
import
sys
__version__
=
'1.1
0'
__version__
=
'1.1
1'
# XXX This version is not always updated :-(
MAXFTPCACHE
=
10
# Trim the ftp cache beyond this size
MAXFTPCACHE
=
10
# Trim the ftp cache beyond this size
...
@@ -896,6 +896,7 @@ def unquote_plus(s):
...
@@ -896,6 +896,7 @@ def unquote_plus(s):
always_safe
=
string
.
letters
+
string
.
digits
+
'_,.-'
always_safe
=
string
.
letters
+
string
.
digits
+
'_,.-'
def
quote
(
s
,
safe
=
'/'
):
def
quote
(
s
,
safe
=
'/'
):
# XXX Can speed this up an order of magnitude
safe
=
always_safe
+
safe
safe
=
always_safe
+
safe
res
=
list
(
s
)
res
=
list
(
s
)
for
i
in
range
(
len
(
res
)):
for
i
in
range
(
len
(
res
)):
...
@@ -905,6 +906,7 @@ def quote(s, safe = '/'):
...
@@ -905,6 +906,7 @@ def quote(s, safe = '/'):
return
string
.
joinfields
(
res
,
''
)
return
string
.
joinfields
(
res
,
''
)
def
quote_plus
(
s
,
safe
=
'/'
):
def
quote_plus
(
s
,
safe
=
'/'
):
# XXX Can speed this up an order of magnitude
if
' '
in
s
:
if
' '
in
s
:
# replace ' ' with '+'
# replace ' ' with '+'
l
=
string
.
split
(
s
,
' '
)
l
=
string
.
split
(
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