https://github.com/python/cpython/commit/0afcb51d17489aee2aa02609ef6f2606a7c5bf26 commit: 0afcb51d17489aee2aa02609ef6f2606a7c5bf26 branch: main author: Adorilson Bezerra <[email protected]> committer: hugovk <[email protected]> date: 2025-11-24T16:02:18+02:00 summary:
gh-106318: Add example for str.isascii() (#137558) 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 7eb4f743d5abab..38de27a2b79549 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -2063,7 +2063,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]
