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

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

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 df431a83972b78..b942118d67fb9b 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1921,6 +1921,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/Unicode15.1.0/ch04.pdf>`_.
+   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