Skip to content

Commit 157897f

Browse files
committed
gh-106318: Improve str.islower() docs
1 parent bbe12a7 commit 157897f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Doc/library/stdtypes.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2289,20 +2289,23 @@ expression support in the :mod:`re` module).
22892289
Return ``True`` if all cased characters [4]_ in the string are lowercase and
22902290
there is at least one cased character, ``False`` otherwise.
22912291

2292-
For example::
2292+
For example:
2293+
2294+
.. doctest::
22932295

2294-
>>> 'BANANA'.islower()
2295-
False
22962296
>>> 'banana'.islower()
22972297
True
2298+
>>> 'BANANA'.islower()
2299+
False
22982300
>>> 'baNana'.islower()
22992301
False
23002302
>>> ' '.islower()
23012303
False
23022304
>>> ''.islower()
23032305
False
23042306

2305-
See also :meth:`isupper`.
2307+
See also :meth:`isupper` and :meth:`lower`.
2308+
23062309

23072310
.. method:: str.isnumeric()
23082311

0 commit comments

Comments
 (0)