| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4de82bc commit f03d9f0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2247,17 +2247,34 @@ expression support in the :mod:`re` module). | |||
| 2247 | 2247 | >>> '\t'.isprintable(), '\n'.isprintable() | |
| 2248 | 2248 | (False, False) | |
| 2249 | 2249 | ||
| 2250 | + See also :meth:`isspace`. | ||
| 2251 | + | ||
| 2250 | 2252 | ||
| 2251 | 2253 | .. method:: str.isspace() | |
| 2252 | 2254 | ||
| 2253 | 2255 | Return ``True`` if there are only whitespace characters in the string and there is | |
| 2254 | 2256 | at least one character, ``False`` otherwise. | |
| 2255 | 2257 | ||
| 2258 | + For example: | ||
| 2259 | + | ||
| 2260 | + .. doctest:: | ||
| 2261 | + | ||
| 2262 | + >>> ''.isspace() | ||
| 2263 | + False | ||
| 2264 | + >>> ' '.isspace() | ||
| 2265 | + True | ||
| 2266 | + >>> '\t\n'.isspace() # TAB and BREAK LINE | ||
| 2267 | + True | ||
| 2268 | + >>> '\u3000'.isspace() # IDEOGRAPHIC SPACE | ||
| 2269 | + True | ||
| 2270 | + | ||
| 2256 | 2271 | A character is *whitespace* if in the Unicode character database | |
| 2257 | 2272 | (see :mod:`unicodedata`), either its general category is ``Zs`` | |
| 2258 | 2273 | ("Separator, space"), or its bidirectional class is one of ``WS``, | |
| 2259 | 2274 | ``B``, or ``S``. | |
| 2260 | 2275 | ||
| 2276 | + See also :meth:`isprintable`. | ||
| 2277 | + | ||
| 2261 | 2278 | ||
| 2262 | 2279 | .. method:: str.istitle() | |
| 2263 | 2280 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments