Skip to content

gh-106318: Add example for str.isalpha() #137557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,18 @@
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::

>>> 'a commom word'.isalpha()
False
>>> 'acommomword'.isalpha()
True
>>> 'µ'.isalpha() # no-ascii characters could be alpha too
True

See :ref:`unicode-properties`.

Check warning on line 2004 in Doc/library/stdtypes.rst

View workflow job for this annotation

GitHub Actions / Docs / Docs

undefined label: 'unicode-properties' [ref.ref]


.. method:: str.isascii()
Expand Down
Loading