classification
Title: Spaces not showing correctly in "split()" documentation on http://www.python.org/doc/2.5.2/lib/string-methods.html
Type: enhancement Stage:
Components: Documentation Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: SkyLined, georg.brandl
Priority: normal Keywords:

Created on 2008-11-06 10:39 by SkyLined, last changed 2008-11-06 18:15 by georg.brandl. This issue is now closed.

Messages (2)
msg75558 - (view) Author: Berend-Jan Wever (SkyLined) Date: 2008-11-06 10:39
Part of the text of the online documentation for the string.split() method:

<snip>
If sep is not specified or is None, a different splitting algorithm is
applied. First, whitespace characters (spaces, tabs, newlines, returns,
and formfeeds) are stripped from both ends. Then, words are separated by
arbitrary length strings of whitespace characters. Consecutive
whitespace delimiters are treated as a single delimiter ("'1 2
3'.split()" returns "['1', '2', '3']"). Splitting an empty string or a
string consisting of just whitespace returns an empty list.
</snip>

As you may have noticed, there should be multiple spaces in ("'1 2
3'.split()". If you look at the HTML source you will see that they are
there. However, because browsers rendering HTML by default replace
multiple space with a single space, they are not visible in the
documentation. This should be addressed by either using <PRE></PRE>
around the text to preserve formatting or by replacing all instances of
multiple spaces with instances of "&nbsp;". I suspect this problem may
be elsewhere in the documentation as well.
msg75575 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-11-06 18:15
This is fixed in the new docs, see
<http://docs.python.org/library/stdtypes#str.split>.
History
Date User Action Args
2008-11-06 18:15:11georg.brandlsetstatus: open -> closed
resolution: out of date
messages: + msg75575
2008-11-06 10:39:40SkyLinedcreate