Message238253
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 |
|
Date |
User |
Action |
Args |
2015-03-17 01:39:42 | martin.panter | set | recipients:
+ martin.panter, docs@python |
2015-03-17 01:39:42 | martin.panter | set | messageid: <1426556382.03.0.776976224321.issue23684@psf.upfronthosting.co.za> |
2015-03-17 01:39:41 | martin.panter | link | issue23684 messages |
2015-03-17 01:39:40 | martin.panter | create | |
|