From: Terry Reedy Date: Tue, 23 Nov 2010 20:17:24 +0000 (+0000) Subject: Issue 1859: Doc that textwrap does not break on \n (pending possible behavior patch... X-Git-Tag: v3.2b1~226 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6d2ab7126eaa10b0b1e8a8bb3cc286604332b6e7;p=thirdparty%2FPython%2Fcpython.git Issue 1859: Doc that textwrap does not break on \n (pending possible behavior patch). Patch by Jeremy Thurgood. --- diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst index f8817013b5fa..860f81f9369c 100644 --- a/Doc/library/textwrap.rst +++ b/Doc/library/textwrap.rst @@ -121,6 +121,13 @@ indentation from strings that have unwanted whitespace to the left of the text. each tab character will be replaced by a single space, which is *not* the same as tab expansion. + .. note:: + + If :attr:`replace_whitespace` is false, newlines may appear in the + middle of a line and cause strange output. For this reason, text should + be split into paragraphs (using :meth:`str.splitlines` or similar) + which are wrapped separately. + .. attribute:: drop_whitespace