This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author martin.panter
Recipients docs@python, martin.panter
Date 2015-03-17.01:39:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1426556382.03.0.776976224321.issue23684@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation for urlsplit() says:

'''
urlparse(urlstring, scheme='', allow_fragments=True)

. . .

If the scheme argument is specified, it gives the default addressing scheme, to be used only if the URL does not specify one. The default value for this argument is the empty string.
'''

However this contradicts the table of attributes, which gives:

Attribute: scheme, . . . Value if not present: empty string

Similarly for urlsplit(). Of course, the description of the “scheme” parameter is correct, and the table is only correct when no “scheme” parameter is given:

>>> urlparse("//example.net").scheme
''
>>> urlparse(b"//example.net").scheme
b''
>>> urlparse("//example.net", "http").scheme
'http'

This issue is split off another where I tried to sneak in a quick fix, but the wording probably needs more thought. Original change: <https://bugs.python.org/review/22852/patch/14176/52720#old-line-92>.

Maybe change it to this?

Value if not present: empty string or default scheme
History
Date User Action Args
2015-03-17 01:39:42martin.pantersetrecipients: + martin.panter, docs@python
2015-03-17 01:39:42martin.pantersetmessageid: <1426556382.03.0.776976224321.issue23684@psf.upfronthosting.co.za>
2015-03-17 01:39:41martin.panterlinkissue23684 messages
2015-03-17 01:39:40martin.pantercreate