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
a4de60a1
Kaydet (Commit)
a4de60a1
authored
Mar 26, 2009
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
663fffa4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
parse.py
Lib/urllib/parse.py
+6
-5
No files found.
Lib/urllib/parse.py
Dosyayı görüntüle @
a4de60a1
...
...
@@ -504,7 +504,7 @@ def quote_from_bytes(bs, safe='/'):
_safe_quoters
[
cachekey
]
=
quoter
return
''
.
join
(
map
(
quoter
.
__getitem__
,
bs
))
def
urlencode
(
query
,
doseq
=
0
):
def
urlencode
(
query
,
doseq
=
0
):
"""Encode a sequence of two-element tuples or dictionary into a URL query string.
If any values in the query arg are sequences and doseq is true, each
...
...
@@ -515,7 +515,7 @@ def urlencode(query,doseq=0):
input.
"""
if
hasattr
(
query
,
"items"
):
if
hasattr
(
query
,
"items"
):
# mapping objects
query
=
query
.
items
()
else
:
...
...
@@ -531,8 +531,9 @@ def urlencode(query,doseq=0):
# allowed empty dicts that type of behavior probably should be
# preserved for consistency
except
TypeError
:
ty
,
va
,
tb
=
sys
.
exc_info
()
raise
TypeError
(
"not a valid non-string sequence or mapping object"
)
.
with_traceback
(
tb
)
ty
,
va
,
tb
=
sys
.
exc_info
()
raise
TypeError
(
"not a valid non-string sequence "
"or mapping object"
)
.
with_traceback
(
tb
)
l
=
[]
if
not
doseq
:
...
...
@@ -551,7 +552,7 @@ def urlencode(query,doseq=0):
# is there a reasonable way to convert to ASCII?
# encode generates a string, but "replace" or "ignore"
# lose information and "strict" can raise UnicodeError
v
=
quote_plus
(
v
.
encode
(
"ASCII"
,
"replace"
))
v
=
quote_plus
(
v
.
encode
(
"ASCII"
,
"replace"
))
l
.
append
(
k
+
'='
+
v
)
else
:
try
:
...
...
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