]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Escaped backslashes in docstrings.
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 3 Apr 2015 15:12:32 +0000 (18:12 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Fri, 3 Apr 2015 15:12:32 +0000 (18:12 +0300)
Lib/codecs.py
Lib/idlelib/SearchEngine.py
Lib/textwrap.py

index cfd24a5a1f27a7e13b171ec8a438786f4ea22cdc..049a3f0fd1f3c65d795f5b5176212a2cb4345a39 100644 (file)
@@ -1057,7 +1057,7 @@ def make_encoding_map(decoding_map):
         during translation.
 
         One example where this happens is cp875.py which decodes
-        multiple character to \u001a.
+        multiple character to \\u001a.
 
     """
     m = {}
index 2118cd33f6186cc0109dd9772c83a50e151f3fb3..963dfd39fe6bf3020011f990e1ba1b3593d19640 100644 (file)
@@ -191,7 +191,7 @@ def search_reverse(prog, chars, col):
 
     This is done by searching forwards until there is no match.
     Prog: compiled re object with a search method returning a match.
-    Chars: line of text, without \n.
+    Chars: line of text, without \\n.
     Col: stop index for the search; the limit for match.end().
     '''
     m = prog.search(chars)
index 62ea0b48e6c18955c08a43805067c072387fee61..e75586082862563c9a42683ffe566ff0ccda2736 100644 (file)
@@ -147,7 +147,7 @@ class TextWrapper:
         """_munge_whitespace(text : string) -> string
 
         Munge whitespace in text: expand tabs and convert all other
-        whitespace characters to spaces.  Eg. " foo\tbar\n\nbaz"
+        whitespace characters to spaces.  Eg. " foo\\tbar\\n\\nbaz"
         becomes " foo    bar  baz".
         """
         if self.expand_tabs:
@@ -193,7 +193,7 @@ class TextWrapper:
         """_fix_sentence_endings(chunks : [string])
 
         Correct for sentence endings buried in 'chunks'.  Eg. when the
-        original text contains "... foo.\nBar ...", munge_whitespace()
+        original text contains "... foo.\\nBar ...", munge_whitespace()
         and split() will convert that to [..., "foo.", " ", "Bar", ...]
         which has one too few spaces; this method simply changes the one
         space to two.
@@ -379,7 +379,7 @@ def dedent(text):
     in indented form.
 
     Note that tabs and spaces are both treated as whitespace, but they
-    are not equal: the lines "  hello" and "\thello" are
+    are not equal: the lines "  hello" and "\\thello" are
     considered to have no common leading whitespace.  (This behaviour is
     new in Python 2.5; older versions of this module incorrectly
     expanded tabs before searching for common leading whitespace.)