Skip to content

Commit 3b53406

Browse files
committed
gh-106318: Add example for str.isalpha()
1 parent ac028d7 commit 3b53406

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Doc/library/stdtypes.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,19 @@ expression support in the :mod:`re` module).
19901990
from the `Alphabetic property defined in the section 4.10 'Letters, Alphabetic, and
19911991
Ideographic' of the Unicode Standard
19921992
<https://www.unicode.org/versions/Unicode16.0.0/core-spec/chapter-4/#G91002>`_.
1993+
For example::
1994+
1995+
..doctest::
1996+
1997+
>>> 'a commom word'.isalpha()
1998+
False
1999+
>>> 'acommomword'.isalpha()
2000+
True
2001+
>>> 'µ'.isalpha() # no-ascii characters could be alpha too
2002+
True
2003+
19932004

2005+
See Unicode Properties section in :ref:`unicode-howto`.
19942006

19952007
.. method:: str.isascii()
19962008

0 commit comments

Comments
 (0)