]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-82151: Update and improve urlsplit docstring (#152985)
authorPranav Choudhary <chaudharyypranav@gmail.com>
Mon, 6 Jul 2026 03:19:17 +0000 (08:49 +0530)
committerGitHub <noreply@github.com>
Mon, 6 Jul 2026 03:19:17 +0000 (20:19 -0700)
* gh-82151: Update and improve urlsplit docstring

Co-authored-by: idomic <michael.ido@gmail.com>
* Slightly improved wording for % escapes. Consistent with rest of the doc.

---------

Co-authored-by: idomic <michael.ido@gmail.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
Doc/library/urllib.parse.rst

index ef48addaba03e9c3c1a59347023afffa8004b2b2..3ce20311c42c8494416fa3569fb76ae1082f1914 100644 (file)
@@ -60,11 +60,16 @@ or on combining URL components into a URL string.
    *missing_as_none* is true.
    Not defined component are represented an empty string (by default) or
    ``None`` if *missing_as_none* is true.
-   The components are not broken up
-   into smaller parts (for example, the network location is a single string), and %
-   escapes are not expanded. The delimiters as shown above are not part of the
-   result, except for a leading slash in the *path* component, which is retained if
-   present.  For example:
+   The delimiters as shown above are not part of the result, except for a
+   leading slash in the *path* component, which is retained if present.
+
+   Additionally, the netloc property is broken down into these additional
+   attributes added to the returned object: username, password, hostname, and
+   port.
+
+   Percent-encoded sequences are not decoded.
+
+   For example:
 
    .. doctest::
       :options: +NORMALIZE_WHITESPACE