mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Bug #649974: make docstrings for url2pathname consistent
This commit is contained in:
parent
ddddd2f7e6
commit
c0b24734e0
4 changed files with 25 additions and 21 deletions
|
@ -8,7 +8,8 @@ import os
|
|||
__all__ = ["url2pathname","pathname2url"]
|
||||
|
||||
def url2pathname(pathname):
|
||||
"Convert /-delimited pathname to mac pathname"
|
||||
"""OS-specific conversion from a relative URL of the 'file' scheme
|
||||
to a file system path; not recommended for general use."""
|
||||
#
|
||||
# XXXX The .. handling should be fixed...
|
||||
#
|
||||
|
@ -49,7 +50,8 @@ def url2pathname(pathname):
|
|||
return urllib.unquote(rv)
|
||||
|
||||
def pathname2url(pathname):
|
||||
"convert mac pathname to /-delimited pathname"
|
||||
"""OS-specific conversion from a file system path to a relative URL
|
||||
of the 'file' scheme; not recommended for general use."""
|
||||
if '/' in pathname:
|
||||
raise RuntimeError, "Cannot convert pathname containing slashes"
|
||||
components = pathname.split(':')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue