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
27eebb8c
Kaydet (Commit)
27eebb8c
authored
Tem 20, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use string.ascii_letters instead of string.letters.
Remove unused import.
üst
960fdf9a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nturl2path.py
Lib/nturl2path.py
+2
-2
No files found.
Lib/nturl2path.py
Dosyayı görüntüle @
27eebb8c
...
@@ -21,7 +21,7 @@ def url2pathname(url):
...
@@ -21,7 +21,7 @@ def url2pathname(url):
# make sure not to convert quoted slashes :-)
# make sure not to convert quoted slashes :-)
return
urllib
.
unquote
(
'
\\
'
.
join
(
components
))
return
urllib
.
unquote
(
'
\\
'
.
join
(
components
))
comp
=
url
.
split
(
'|'
)
comp
=
url
.
split
(
'|'
)
if
len
(
comp
)
!=
2
or
comp
[
0
][
-
1
]
not
in
string
.
letters
:
if
len
(
comp
)
!=
2
or
comp
[
0
][
-
1
]
not
in
string
.
ascii_
letters
:
error
=
'Bad URL: '
+
url
error
=
'Bad URL: '
+
url
raise
IOError
,
error
raise
IOError
,
error
drive
=
comp
[
0
][
-
1
]
.
upper
()
drive
=
comp
[
0
][
-
1
]
.
upper
()
...
@@ -42,7 +42,7 @@ def pathname2url(p):
...
@@ -42,7 +42,7 @@ def pathname2url(p):
///C|/foo/bar/spam.foo
///C|/foo/bar/spam.foo
"""
"""
import
string
,
urllib
import
urllib
if
not
':'
in
p
:
if
not
':'
in
p
:
# No drive specifier, just convert slashes and quote the name
# No drive specifier, just convert slashes and quote the name
if
p
[:
2
]
==
'
\\\\
'
:
if
p
[:
2
]
==
'
\\\\
'
:
...
...
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