Skip to content

Commit 7b2f537

Browse files
committed
gh-106318: Add doctest role to str.isascii() doc
1 parent 33f5bd0 commit 7b2f537

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/stdtypes.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,9 +1996,9 @@ expression support in the :mod:`re` module).
19961996

19971997
Return ``True`` if the string is empty or all characters in the string are ASCII,
19981998
``False`` otherwise.
1999-
ASCII characters have code points in the range U+0000-U+007F.
1999+
ASCII characters have code points in the range U+0000-U+007F. For example:
20002000

2001-
For example::
2001+
.. doctest::
20022002

20032003
>>> 'a common word'.isascii()
20042004
True

0 commit comments

Comments
 (0)