mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
Merged revisions 86296 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86296 | senthil.kumaran | 2010-11-07 20:57:04 +0800 (Sun, 07 Nov 2010) | 3 lines Fix Issue10226 - Clarifying the role of the netloc separator. ........
This commit is contained in:
parent
bee54f53b1
commit
e4be72197f
1 changed files with 4 additions and 5 deletions
|
|
@ -48,11 +48,10 @@ The :mod:`urllib.parse` module defines the following functions:
|
||||||
>>> o.geturl()
|
>>> o.geturl()
|
||||||
'http://www.cwi.nl:80/%7Eguido/Python.html'
|
'http://www.cwi.nl:80/%7Eguido/Python.html'
|
||||||
|
|
||||||
If the scheme value is not specified, urlparse expects the netloc value to
|
Following the syntax specifications in :rfc:`1808`, urlparse recognizes
|
||||||
start with '//', following the syntax specifications from :rfc:`1808`.
|
a netloc only if it is properly introduced by '//'. Otherwise the
|
||||||
Otherwise, it is not possible to distinguish between netloc and path
|
input is presumed to be a relative URL and thus to start with
|
||||||
components, and would the indistinguishable component would be classified
|
a path component.
|
||||||
as the path as in a relative URL.
|
|
||||||
|
|
||||||
>>> from urlparse import urlparse
|
>>> from urlparse import urlparse
|
||||||
>>> urlparse('//www.cwi.nl:80/%7Eguido/Python.html')
|
>>> urlparse('//www.cwi.nl:80/%7Eguido/Python.html')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue