From: Andrew Svetlov Date: Mon, 13 Aug 2012 20:23:02 +0000 (+0300) Subject: Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. X-Git-Tag: v3.3.0rc1~124 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f334f740e47a8ac1fd5d144813be7380192ac28b;p=thirdparty%2FPython%2Fcpython.git Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. Patch by Chris Jerdonek. --- f334f740e47a8ac1fd5d144813be7380192ac28b diff --cc Doc/library/textwrap.rst index 50c710c522e4,547db79d77c1..0ac1cc60786f --- a/Doc/library/textwrap.rst +++ b/Doc/library/textwrap.rst @@@ -134,20 -107,13 +134,22 @@@ in a block of text expanded to spaces using the :meth:`expandtabs` method of *text*. + .. attribute:: tabsize + + (default: ``8``) If :attr:`expand_tabs` is true, then all tab characters + in *text* will be expanded to zero or more spaces, depending on the + current column and the given tab size. + + .. versionadded:: 3.3 + + .. attribute:: replace_whitespace - (default: ``True``) If true, each whitespace character (as defined by - ``string.whitespace``) remaining after tab expansion will be replaced by a - single space. + (default: ``True``) If true, after tab expansion but before wrapping, + the :meth:`wrap` method will replace each whitespace character + with a single space. The whitespace characters replaced are + as follows: tab, newline, vertical tab, formfeed, and carriage + return (``'\t\n\v\f\r'``). .. note::