From: Terry Reedy Date: Tue, 23 Nov 2010 20:25:19 +0000 (+0000) Subject: Issue 1859: Document that textwrap does not break on \n X-Git-Tag: v3.1.3~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8b7eef3413eb35f3486b4ffa3e7969b86f2678e1;p=thirdparty%2FPython%2Fcpython.git Issue 1859: Document that textwrap does not break on \n Merged from 86717 --- diff --git a/Doc/library/textwrap.rst b/Doc/library/textwrap.rst index f66416f3c627..835701340a9c 100644 --- a/Doc/library/textwrap.rst +++ b/Doc/library/textwrap.rst @@ -117,6 +117,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