From 5c7733a441974ce1f0ed22dc620222139997595c Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sun, 15 Feb 2026 19:52:14 +0000 Subject: [PATCH 1/3] gh-106318: Improve str.lower() docs --- Doc/library/stdtypes.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index d4540e0b8198716..ddc5300c3716a01 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2437,6 +2437,20 @@ expression support in the :mod:`re` module). >>> 'Lower Method Example'.lower() 'lower method example' + Note that ``s.lower().islower()`` might be ``False`` if ``s`` + contains uncased characters or if the Unicode category of the resulting + character(s) is not "Lu" (Letter, uppercase), but e.g. "Lt" (Letter, + titlecase). + + For example, see the word "Python" written in Punjabi, the most spoken + language in Pakistan: + + .. doctest:: + + >>> 'ازگر'.lower().islower() + False + + The lowercasing algorithm used is `described in section 3.13.2 'Default Case Conversion' of the Unicode Standard `__. From 95297c073fa7e181eb2e615c90a3beffc1252253 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Mon, 16 Feb 2026 12:51:02 +0000 Subject: [PATCH 2/3] gh-106318: Replace latin abreviation on str.lower() docs --- Doc/library/stdtypes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index ddc5300c3716a01..4b689c292a54cf3 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2439,7 +2439,7 @@ expression support in the :mod:`re` module). Note that ``s.lower().islower()`` might be ``False`` if ``s`` contains uncased characters or if the Unicode category of the resulting - character(s) is not "Lu" (Letter, uppercase), but e.g. "Lt" (Letter, + character(s) is not "Lu" (Letter, uppercase), but for instance "Lt" (Letter, titlecase). For example, see the word "Python" written in Punjabi, the most spoken From 83950305ba38ba0c8db3ba8ce99a1eb0b79f486d Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 2 Dec 2026 16:28:30 +0100 Subject: [PATCH 3/3] Apply suggestion from @encukou --- Doc/builtins/stdtypes.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Doc/builtins/stdtypes.rst b/Doc/builtins/stdtypes.rst index ee5cb4cfcbca2ea..813ff16dcd831b1 100644 --- a/Doc/builtins/stdtypes.rst +++ b/Doc/builtins/stdtypes.rst @@ -2667,8 +2667,7 @@ expression support in the :mod:`re` module). character(s) is not "Lu" (Letter, uppercase), but for instance "Lt" (Letter, titlecase). - For example, see the word "Python" written in Punjabi, the most spoken - language in Pakistan: + For example, see the word "Python" written in Punjabi: .. doctest::