]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-82151: Update and improve urlsplit docstring (#152985) (#153156)
authorSenthil Kumaran <senthil@python.org>
Tue, 7 Jul 2026 00:32:43 +0000 (17:32 -0700)
committerGitHub <noreply@github.com>
Tue, 7 Jul 2026 00:32:43 +0000 (17:32 -0700)
gh-82151: Update and improve urlsplit docstring (#152985)

(cherry picked from commit ad54b91b9fa4c5d12f155bb09138dff21a2bdec3)

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

index 499e7f53226ca78bb1d96eeb32b773ae5221e96d..752837593c7ca6665621a3828b06a95c16e59bd1 100644 (file)
@@ -56,11 +56,18 @@ or on combining URL components into a URL string.
    :class:`SplitResult` or :class:`SplitResultBytes`.
    This corresponds to the general structure of a URL:
    ``scheme://netloc/path?query#fragment``.
-   Each tuple item is a string, possibly empty. 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:
+   Each tuple item is a string, possibly empty.
+
+   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