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
4722da6e
Kaydet (Commit)
4722da6e
authored
Agu 25, 1998
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix typo in keyword argument 'allow_frament' should be 'allow_fragment'
üst
afd3daed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
urlparse.py
Lib/urlparse.py
+6
-6
No files found.
Lib/urlparse.py
Dosyayı görüntüle @
4722da6e
...
...
@@ -43,8 +43,8 @@ def clear_cache():
# Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
# Note that we don't break the components up in smaller bits
# (e.g. netloc is a single string) and we don't expand % escapes.
def
urlparse
(
url
,
scheme
=
''
,
allow_framents
=
1
):
key
=
url
,
scheme
,
allow_framents
def
urlparse
(
url
,
scheme
=
''
,
allow_fra
g
ments
=
1
):
key
=
url
,
scheme
,
allow_fra
g
ments
try
:
return
_parse_cache
[
key
]
except
KeyError
:
...
...
@@ -65,7 +65,7 @@ def urlparse(url, scheme = '', allow_framents = 1):
if
i
<
0
:
i
=
len
(
url
)
netloc
,
url
=
url
[
2
:
i
],
url
[
i
:]
if
allow_framents
and
scheme
in
uses_fragment
:
if
allow_fra
g
ments
and
scheme
in
uses_fragment
:
i
=
string
.
rfind
(
url
,
'#'
)
if
i
>=
0
:
url
,
fragment
=
url
[:
i
],
url
[
i
+
1
:]
...
...
@@ -101,13 +101,13 @@ def urlunparse((scheme, netloc, url, params, query, fragment)):
# Join a base URL and a possibly relative URL to form an absolute
# interpretation of the latter.
def
urljoin
(
base
,
url
,
allow_framents
=
1
):
def
urljoin
(
base
,
url
,
allow_fra
g
ments
=
1
):
if
not
base
:
return
url
bscheme
,
bnetloc
,
bpath
,
bparams
,
bquery
,
bfragment
=
\
urlparse
(
base
,
''
,
allow_framents
)
urlparse
(
base
,
''
,
allow_fra
g
ments
)
scheme
,
netloc
,
path
,
params
,
query
,
fragment
=
\
urlparse
(
url
,
bscheme
,
allow_framents
)
urlparse
(
url
,
bscheme
,
allow_fra
g
ments
)
# XXX Unofficial hack: default netloc to bnetloc even if
# schemes differ
if
scheme
!=
bscheme
and
not
netloc
and
\
...
...
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