https://github.com/python/cpython/commit/e2188c7e5e0609a59ccb18c25fa8f61b1047f92d
commit: e2188c7e5e0609a59ccb18c25fa8f61b1047f92d
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2025-11-24T14:08:14Z
summary:

[3.13] gh-106318: Add example for str.isascii() (GH-137558) (#141899)

Co-authored-by: Adorilson Bezerra <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>

files:
M Doc/library/stdtypes.rst

diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 0cbc5a9cb2701c..df431a83972b78 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1927,7 +1927,14 @@ expression support in the :mod:`re` module).
 
    Return ``True`` if the string is empty or all characters in the string are 
ASCII,
    ``False`` otherwise.
-   ASCII characters have code points in the range U+0000-U+007F.
+   ASCII characters have code points in the range U+0000-U+007F. For example:
+
+   .. doctest::
+
+      >>> 'ASCII characters'.isascii()
+      True
+      >>> 'ยต'.isascii()
+      False
 
    .. versionadded:: 3.7
 

_______________________________________________
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