https://github.com/python/cpython/commit/7b0a372b20ae3b80053d52e84c2b7bdd114c19f0 commit: 7b0a372b20ae3b80053d52e84c2b7bdd114c19f0 branch: main author: Adorilson Bezerra <[email protected]> committer: vstinner <[email protected]> date: 2026-01-06T17:43:44+01:00 summary:
gh-106318: Add examples for str.isprintable() (#140043) Co-authored-by: Stan Ulbrych <[email protected]> files: M Doc/library/stdtypes.rst diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 7eaa9f48ab5bc4..d77d7310020195 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -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() _______________________________________________ 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]
