]> 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:29:02 +0000 (17:29 +0200)
committerAndrew Svetlov <andrew.svetlov@gmail.com>
Thu, 8 Nov 2012 15:29:02 +0000 (17:29 +0200)
Thanks to Yongzhi Pan.

Doc/library/stdtypes.rst

index f00c4fb4f5be8dae768403d93f2b9f047d55bec1..e42791fe2765ff0a1c1e2d70ffe020a76a45d0d2 100644 (file)
@@ -1253,11 +1253,11 @@ string 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."