Message166855
| 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:41 | chris.jerdonek | set | recipients:
+ chris.jerdonek, docs@python |
| 2012年07月30日 04:10:41 | chris.jerdonek | set | messageid: <1343621441.45.0.427004155003.issue15497@psf.upfronthosting.co.za> |
| 2012年07月30日 04:10:40 | chris.jerdonek | link | issue15497 messages |
| 2012年07月30日 04:10:40 | chris.jerdonek | create |
|