Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e4be721

Browse files
committed
Merged revisions 86296 via svnmerge from
svn+ssh://[email protected]/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. ........
1 parent bee54f5 commit e4be721

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

Doc/library/urllib.parse.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ The :mod:`urllib.parse` module defines the following functions:
4848
>>> o.geturl()
4949
'http://www.cwi.nl:80/%7Eguido/Python.html'
5050

51-
If the scheme value is not specified, urlparse expects the netloc value to
52-
start with '//', following the syntax specifications from :rfc:`1808`.
53-
Otherwise, it is not possible to distinguish between netloc and path
54-
components, and would the indistinguishable component would be classified
55-
as the path as in a relative URL.
51+
Following the syntax specifications in :rfc:`1808`, urlparse recognizes
52+
a netloc only if it is properly introduced by '//'. Otherwise the
53+
input is presumed to be a relative URL and thus to start with
54+
a path component.
5655

5756
>>> from urlparse import urlparse
5857
>>> urlparse('//www.cwi.nl:80/%7Eguido/Python.html')

0 commit comments

Comments
 (0)