From: Andrew M. Kuchling Date: Fri, 5 Jan 2007 14:24:36 +0000 (+0000) Subject: [Bug #1622533] Make docstrings raw strings because they contain control characters... X-Git-Tag: v2.5.1c1~188 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3b015c46a5f12322839512d54e15f51f5e10d3e4;p=python [Bug #1622533] Make docstrings raw strings because they contain control characters (\0, \1) --- diff --git a/Lib/StringIO.py b/Lib/StringIO.py index 1e5f25408d..232009fb93 100644 --- a/Lib/StringIO.py +++ b/Lib/StringIO.py @@ -137,7 +137,7 @@ class StringIO: return r def readline(self, length=None): - """Read one entire line from the file. + r"""Read one entire line from the file. A trailing newline character is kept in the string (but may be absent when a file ends with an incomplete line). If the size argument is diff --git a/Lib/difflib.py b/Lib/difflib.py index 3e28b18bf4..d1c29318a6 100644 --- a/Lib/difflib.py +++ b/Lib/difflib.py @@ -1311,7 +1311,7 @@ def ndiff(a, b, linejunk=None, charjunk=IS_CHARACTER_JUNK): def _mdiff(fromlines, tolines, context=None, linejunk=None, charjunk=IS_CHARACTER_JUNK): - """Returns generator yielding marked up from/to side by side differences. + r"""Returns generator yielding marked up from/to side by side differences. Arguments: fromlines -- list of text lines to compared to tolines