[New-bugs-announce] [issue37970] urllib.parse docstrings incomplete
Zachary Ware
report at bugs.python.org
Wed Aug 28 12:26:39 EDT 2019
New submission from Zachary Ware <zachary.ware at gmail.com>:
For example, urlsplit:
>>> from urllib.parse import urlsplit
>>> help(urlsplit)
Help on function urlsplit in module urllib.parse:
urlsplit(url, scheme='', allow_fragments=True)
Parse a URL into 5 components:
<scheme>://<netloc>/<path>?<query>#<fragment>
Return a 5-tuple: (scheme, netloc, path, query, fragment).
Note that we don't break the components up in smaller bits
(e.g. netloc is a single string) and we don't expand % escapes.
The current docstring does not describe the `scheme` or `allow_fragments` arguments. Also, the note about not splitting netloc is misleading; the components of netloc (username, password, hostname, and port) are available as extra attributes of the returned SplitResult.
urlparse has similar issues; other functions could stand to be checked.
----------
assignee: docs at python
components: Documentation, Library (Lib)
keywords: newcomer friendly
messages: 350668
nosy: docs at python, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: urllib.parse docstrings incomplete
versions: Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37970>
_______________________________________
More information about the New-bugs-announce
mailing list