https://github.com/python/cpython/commit/9e46e1b05c91c663422d634ca5a2d29fb4b520eb
commit: 9e46e1b05c91c663422d634ca5a2d29fb4b520eb
branch: 3.14
author: Hugo van Kemenade <[email protected]>
committer: hugovk <[email protected]>
date: 2025-11-24T14:28:49Z
summary:

[3.14] gh-106318: Add example for str.isalpha() (GH-137557) (#141901)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Éric <[email protected]>
Co-authored-by: Victor Stinner <[email protected]>

files:
M Doc/howto/unicode.rst
M Doc/library/stdtypes.rst

diff --git a/Doc/howto/unicode.rst b/Doc/howto/unicode.rst
index 254fe729355353..243cc27bac7025 100644
--- a/Doc/howto/unicode.rst
+++ b/Doc/howto/unicode.rst
@@ -352,6 +352,8 @@ If you don't include such a comment, the default encoding 
used will be UTF-8 as
 already mentioned.  See also :pep:`263` for more information.
 
 
+.. _unicode-properties:
+
 Unicode Properties
 ------------------
 
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 9b1c6a3a744fdc..7b9f5a69d4067d 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2057,6 +2057,18 @@ expression support in the :mod:`re` module).
    from the `Alphabetic property defined in the section 4.10 'Letters, 
Alphabetic, and
    Ideographic' of the Unicode Standard
    
<https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-4/#G91002>`_.
+   For example:
+
+   .. doctest::
+
+      >>> 'Letters and spaces'.isalpha()
+      False
+      >>> 'LettersOnly'.isalpha()
+      True
+      >>> 'µ'.isalpha()  # non-ASCII characters can be considered alphabetical 
too
+      True
+
+   See :ref:`unicode-properties`.
 
 
 .. method:: str.isascii()

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to