File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -2096,17 +2096,34 @@ expression support in the :mod:`re` module).
20962096 >>> ' \t ' .isprintable(), ' \n ' .isprintable()
20972097 (False, False)
20982098
2099+ See also :meth: `isspace `.
2100+
20992101
21002102.. method :: str.isspace()
21012103
21022104 Return ``True `` if there are only whitespace characters in the string and there is
21032105 at least one character, ``False `` otherwise.
21042106
2107+ For example:
2108+
2109+ .. doctest ::
2110+
2111+ >>> ' ' .isspace()
2112+ False
2113+ >>> ' ' .isspace()
2114+ True
2115+ >>> ' \t\n ' .isspace() # TAB and BREAK LINE
2116+ True
2117+ >>> ' \u3000 ' .isspace() # IDEOGRAPHIC SPACE
2118+ True
2119+
21052120 A character is *whitespace * if in the Unicode character database
21062121 (see :mod: `unicodedata `), either its general category is ``Zs ``
21072122 ("Separator, space"), or its bidirectional class is one of ``WS ``,
21082123 ``B ``, or ``S ``.
21092124
2125+ See also :meth: `isprintable `.
2126+
21102127
21112128.. method :: str.istitle()
21122129
You can’t perform that action at this time.
0 commit comments