[docs] [issue15497] correct characters in TextWrapper.replace_whitespace docs

Chris Jerdonek report at bugs.python.org
Mon Jul 30 06:10:41 CEST 2012

New submission from Chris Jerdonek:

This issue is to correct the list of whitespace characters to replace in the documentation for the textwrap module's TextWrapper.replace_whitespace attribute.

The documentation says this list is string.whitespace:


However, the code deliberately avoids using string.whitespace and uses a hard-coded list of characters instead.  For example, see this code comment:

# Hardcode the recognized whitespace characters to the US-ASCII
# whitespace characters.  The main reason for doing this is that in
# ISO-8859-1, 0xa0 is non-breaking whitespace, so in certain locales
# that character winds up in string.whitespace....


Patch attached.

assignee: docs at python
components: Documentation
files: issue-textwrap-whitespace.patch
keywords: easy, patch
messages: 166855
nosy: cjerdonek, docs at python
priority: normal
severity: normal
stage: patch review
status: open
title: correct characters in TextWrapper.replace_whitespace docs
versions: Python 2.7, Python 3.3
Added file: http://bugs.python.org/file26591/issue-textwrap-whitespace.patch

Python tracker <report at bugs.python.org>

More information about the docs mailing list