]> granicus.if.org Git - python/commitdiff
Issue #16439: Fix markup in example for stdtypes.
authorAndrew Svetlov <andrew.svetlov@gmail.com>
Thu, 8 Nov 2012 15:26:53 +0000 (17:26 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Thu, 8 Nov 2012 15:26:53 +0000 (17:26 +0200)
Thanks to Yongzhi Pan.

Doc/library/stdtypes.rst

index 6e6e8ce51a26bba8197403c6b5e6fc3de04e468c..1d7467d2b5a6c5dca897a3e24d4ac52f94a3ce60 100644 (file)
@@ -1390,11 +1390,11 @@ functions based on regular expressions.
 
         >>> import re
         >>> def titlecase(s):
-                return re.sub(r"[A-Za-z]+('[A-Za-z]+)?",
-                              lambda mo: mo.group(0)[0].upper() +
-                                         mo.group(0)[1:].lower(),
-                              s)
-
+        ...     return re.sub(r"[A-Za-z]+('[A-Za-z]+)?",
+        ...                   lambda mo: mo.group(0)[0].upper() +
+        ...                              mo.group(0)[1:].lower(),
+        ...                   s)
+        ...
         >>> titlecase("they're bill's friends.")
         "They're Bill's Friends."