Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spaces not showing correctly in "split()" documentation on http://www.python.org/doc/2.5.2/lib/string-methods.html #48519

Closed
SkyLined mannequin opened this issue Nov 6, 2008 · 2 comments
Assignees
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@SkyLined
Copy link
Mannequin

SkyLined mannequin commented Nov 6, 2008

BPO 4269
Nosy @birkenfeld

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/birkenfeld'
closed_at = <Date 2008-11-06.18:15:11.814>
created_at = <Date 2008-11-06.10:39:40.155>
labels = ['type-feature', 'docs']
title = 'Spaces not showing correctly in "split()" documentation on http://www.python.org/doc/2.5.2/lib/string-methods.html'
updated_at = <Date 2008-11-06.18:15:11.812>
user = 'https://bugs.python.org/SkyLined'

bugs.python.org fields:

activity = <Date 2008-11-06.18:15:11.812>
actor = 'georg.brandl'
assignee = 'georg.brandl'
closed = True
closed_date = <Date 2008-11-06.18:15:11.814>
closer = 'georg.brandl'
components = ['Documentation']
creation = <Date 2008-11-06.10:39:40.155>
creator = 'SkyLined'
dependencies = []
files = []
hgrepos = []
issue_num = 4269
keywords = []
message_count = 2.0
messages = ['75558', '75575']
nosy_count = 2.0
nosy_names = ['georg.brandl', 'SkyLined']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = None
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue4269'
versions = []

@SkyLined
Copy link
Mannequin Author

SkyLined mannequin commented Nov 6, 2008

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 " ". I suspect this problem may
be elsewhere in the documentation as well.

@SkyLined SkyLined mannequin assigned birkenfeld Nov 6, 2008
@SkyLined SkyLined mannequin added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Nov 6, 2008
@birkenfeld
Copy link
Member

This is fixed in the new docs, see
<http://docs.python.org/library/stdtypes#str.split\>.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

1 participant