This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author chris.jerdonek
Recipients chris.jerdonek, docs@python
Date 2012-07-30.04:10:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1343621441.45.0.427004155003.issue15497@psf.upfronthosting.co.za>
In-reply-to
Content
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:

http://docs.python.org/dev/library/textwrap.html#textwrap.TextWrapper.replace_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....

http://hg.python.org/cpython/file/917295aaad76/Lib/textwrap.py#l12

Patch attached.
History
Date User Action Args
2012-07-30 04:10:41chris.jerdoneksetrecipients: + chris.jerdonek, docs@python
2012-07-30 04:10:41chris.jerdoneksetmessageid: <1343621441.45.0.427004155003.issue15497@psf.upfronthosting.co.za>
2012-07-30 04:10:40chris.jerdoneklinkissue15497 messages
2012-07-30 04:10:40chris.jerdonekcreate