From e0b66d9ebeb2c88d9aac3c13d031768f92db42dc Mon Sep 17 00:00:00 2001 From: Pranav Choudhary Date: Mon, 6 Jul 2026 08:49:17 +0530 Subject: [PATCH] gh-82151: Update and improve urlsplit docstring (GH-152985) * gh-82151: Update and improve urlsplit docstring Co-authored-by: idomic * Slightly improved wording for % escapes. Consistent with rest of the doc. --------- (cherry picked from commit ad54b91b9fa4c5d12f155bb09138dff21a2bdec3) Co-authored-by: Pranav Choudhary Co-authored-by: idomic Co-authored-by: Senthil Kumaran --- Doc/library/urllib.parse.rst | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Doc/library/urllib.parse.rst b/Doc/library/urllib.parse.rst index ef48addaba03e9c..3ce20311c42c849 100644 --- a/Doc/library/urllib.parse.rst +++ b/Doc/library/urllib.parse.rst @@ -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