Skip to content

Commit f7711d5

Browse files
miss-islingtonadorilsonStanFromIreland
authored
[3.13] gh-106318: Add examples for str.isprintable() (GH-140043) (#143484)
gh-106318: Add examples for str.isprintable() (GH-140043) (cherry picked from commit 7b0a372) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent 7f93669 commit f7711d5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Doc/library/stdtypes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2052,6 +2052,15 @@ expression support in the :mod:`re` module).
20522052
Nonprintable characters are those in group Separator or Other (Z or C),
20532053
except the ASCII space.
20542054

2055+
For example:
2056+
2057+
.. doctest::
2058+
2059+
>>> ''.isprintable(), ' '.isprintable()
2060+
(True, True)
2061+
>>> '\t'.isprintable(), '\n'.isprintable()
2062+
(False, False)
2063+
20552064

20562065
.. method:: str.isspace()
20572066

0 commit comments

Comments
 (0)