File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -2123,6 +2123,8 @@ expression support in the :mod:`re` module).
21232123 value Numeric_Type=Digit, Numeric_Type=Decimal or Numeric_Type=Numeric.
21242124
21252125
2126+ .. _meth-str-isprintable :
2127+
21262128.. method :: str.isprintable()
21272129
21282130 Return ``True `` if all characters in the string are printable, ``False `` if it
@@ -2139,6 +2141,15 @@ expression support in the :mod:`re` module).
21392141 Nonprintable characters are those in group Separator or Other (Z or C),
21402142 except the ASCII space.
21412143
2144+ For example:
2145+
2146+ .. doctest ::
2147+
2148+ >>> ' ' .isprintable(), ' ' .isprintable()
2149+ (True, True)
2150+ >>> ' \t ' .isprintable(), ' \n ' .isprintable() # TAB and BREAK LINE
2151+ (False, False)
2152+
21422153
21432154.. method :: str.isspace()
21442155
You can’t perform that action at this time.
0 commit comments