mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
[3.13] gh-106318: Add example for str.isascii() (GH-137558) (#141899)
Co-authored-by: Adorilson Bezerra <adorilson@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
2701e8e542
commit
e2188c7e5e
1 changed files with 8 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue