mirror of
https://github.com/python/cpython.git
synced 2026-04-24 21:01:04 +00:00
gh-106318: Add examples for str.isprintable() (#140043)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
parent
90c44bc803
commit
7b0a372b20
1 changed files with 9 additions and 0 deletions
|
|
@ -2190,6 +2190,15 @@ expression support in the :mod:`re` module).
|
|||
Nonprintable characters are those in group Separator or Other (Z or C),
|
||||
except the ASCII space.
|
||||
|
||||
For example:
|
||||
|
||||
.. doctest::
|
||||
|
||||
>>> ''.isprintable(), ' '.isprintable()
|
||||
(True, True)
|
||||
>>> '\t'.isprintable(), '\n'.isprintable()
|
||||
(False, False)
|
||||
|
||||
|
||||
.. method:: str.isspace()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue