Bug #649974: make docstrings for url2pathname consistent

This commit is contained in:
Georg Brandl 2005-12-26 22:53:56 +00:00
parent ddddd2f7e6
commit c0b24734e0
4 changed files with 25 additions and 21 deletions

View file

@ -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(':')