New submission from Martin Panter: 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 ---------- assignee: docs@python components: Documentation messages: 238253 nosy: docs@python, vadmium priority: normal severity: normal status: open title: urlparse() documentation does not account for default scheme _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23684> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com