[issue15497] correct characters in TextWrapper.replace_whitespace docs
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: http://docs.python.org/dev/library/textwrap.html#textwrap.TextWrapper.replac... 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. ---------- assignee: docs@python components: Documentation files: issue-textwrap-whitespace.patch keywords: easy, patch messages: 166855 nosy: cjerdonek, docs@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@bugs.python.org> <http://bugs.python.org/issue15497> _______________________________________
Changes by Chris Jerdonek <chris.jerdonek@gmail.com>: ---------- nosy: +asvetlov versions: +Python 3.2 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15497> _______________________________________
Roundup Robot added the comment: New changeset 90a8a462d2f7 by Andrew Svetlov in branch '3.2': Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. http://hg.python.org/cpython/rev/90a8a462d2f7 New changeset edcbf3edf701 by Andrew Svetlov in branch 'default': Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. http://hg.python.org/cpython/rev/edcbf3edf701 New changeset 3bddc965e2ea by Andrew Svetlov in branch '2.7': Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. http://hg.python.org/cpython/rev/3bddc965e2ea ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15497> _______________________________________
Andrew Svetlov added the comment: Done. Thanks, Chris. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15497> _______________________________________
participants (3)
-
Andrew Svetlov
-
Chris Jerdonek
-
Roundup Robot