Skip to content

Commit b970bcd

Browse files
[3.14] gh-106318: Add examples for str.islower() docs (GH-144847) (#163018)
gh-106318: Add examples for str.islower() docs (GH-144847) (cherry picked from commit dd3f5cd) Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
1 parent 786f1fa commit b970bcd

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

‎Doc/builtins/stdtypes.rst‎

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

2240+
For example:
2241+
2242+
.. doctest::
2243+
2244+
>>> 'banana'.islower()
2245+
True
2246+
>>> 'BANANA'.islower()
2247+
False
2248+
>>> 'baNana'.islower()
2249+
False
2250+
>>> ' '.islower()
2251+
False
2252+
>>> ''.islower()
2253+
False
2254+
2255+
See also :meth:`isupper` and :meth:`lower`.
2256+
22402257

22412258
.. method:: str.isnumeric()
22422259

@@ -2349,7 +2366,10 @@ expression support in the :mod:`re` module).
23492366
False
23502367
>>> ' '.isupper()
23512368
False
2369+
>>> ''.isupper()
2370+
False
23522371

2372+
See also :meth:`islower` and :meth:`upper`.
23532373

23542374

23552375
.. _meth-str-join:

0 commit comments

Comments
 (0)