From 85664f354bad2c9d568c2fc5a03aa3d960e4aaf7 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 2 Jul 2023 18:11:45 +0200 Subject: [PATCH 1/5] gh-106320: Remove private _PyInterpreterState functions (#106335) Remove private _PyThreadState and _PyInterpreterState C API functions: move them to the internal C API (pycore_pystate.h and pycore_interp.h). Don't export most of these functions anymore, but still export functions used by tests. Remove _PyThreadState_Prealloc() and _PyThreadState_Init() from the C API, but keep it in the stable API. From 9907d9bfc4ba3ab0ea119d64aabfce9bf7ddb5dc Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sat, 30 Dec 2023 16:00:03 +0000 Subject: [PATCH 2/5] Doc: minor change --- Doc/library/array.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index 1f04f697c7507f..e4940e27e01232 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -282,3 +282,4 @@ Examples:: `NumPy `_ The NumPy package defines another array type. + From ac028d7043b53409487208c93952c96c984c431b Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Mon, 25 Mar 2024 19:23:48 +0000 Subject: [PATCH 3/5] Revert "Doc: minor change" This reverts commit ebfa0937c2caf0110ab1540f14956d56fe925092. --- Doc/library/array.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/Doc/library/array.rst b/Doc/library/array.rst index e4940e27e01232..1f04f697c7507f 100644 --- a/Doc/library/array.rst +++ b/Doc/library/array.rst @@ -282,4 +282,3 @@ Examples:: `NumPy `_ The NumPy package defines another array type. - From 427214ee49f8a24bfde851eeeddb332ea28ba654 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Sun, 14 Mar 2021 20:41:35 -0300 Subject: [PATCH 4/5] gh-106318: Add example for str.isalnum() --- Doc/library/stdtypes.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index a81a6704142dcc..5cba0ed0a5d6cb 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1980,6 +1980,16 @@ expression support in the :mod:`re` module). of the following returns ``True``: ``c.isalpha()``, ``c.isdecimal()``, ``c.isdigit()``, or ``c.isnumeric()``. + For example:: + + >>> ''.isalnum() + False + >>> 'abc123'.isalnum() + True + >>> 'abc123!@#'.isalnum() + False + >>> ' '.isalnum() + False .. method:: str.isalpha() From 7a1058bf9694f3456433a153cfbb06d04b1620c7 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Fri, 8 Aug 2025 13:33:29 +0100 Subject: [PATCH 5/5] gh-106318: Some improvements to str.isalnum() example --- Doc/library/stdtypes.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 5cba0ed0a5d6cb..3c27e91eb15482 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -1978,19 +1978,20 @@ expression support in the :mod:`re` module). Return ``True`` if all characters in the string are alphanumeric and there is at least one character, ``False`` otherwise. A character ``c`` is alphanumeric if one of the following returns ``True``: ``c.isalpha()``, ``c.isdecimal()``, - ``c.isdigit()``, or ``c.isnumeric()``. + ``c.isdigit()``, or ``c.isnumeric()``. For example:: - For example:: + .. doctest:: - >>> ''.isalnum() - False >>> 'abc123'.isalnum() True >>> 'abc123!@#'.isalnum() False + >>> ''.isalnum() + False >>> ' '.isalnum() False + .. method:: str.isalpha() Return ``True`` if all characters in the string are alphabetic and there is at least