]> granicus.if.org Git - python/commitdiff
Doc: Add example snippet for str.isupper() (GH-14681)
authorKishore Vancheeshwaran <24776049+kishvanchee@users.noreply.github.com>
Fri, 13 Sep 2019 09:20:01 +0000 (14:50 +0530)
committerStéphane Wirtel <stephane@wirtel.be>
Fri, 13 Sep 2019 09:20:01 +0000 (10:20 +0100)
Doc/library/stdtypes.rst

index 426d768b170e6ede7f42ee3d279d1ae63b7dd2fb..a21c5538cbcc743f2e10426e673c87d39d9ca1d0 100644 (file)
@@ -1782,6 +1782,16 @@ expression support in the :mod:`re` module).
    Return true if all cased characters [4]_ in the string are uppercase and
    there is at least one cased character, false otherwise.
 
+      >>> 'BANANA'.isupper()
+      True
+      >>> 'banana'.isupper()
+      False
+      >>> 'baNana'.isupper()
+      False
+      >>> ' '.isupper()
+      False
+
+
 
 .. method:: str.join(iterable)