Sean Reifschneider added the comment:

I believe this is just a place where the documentation could be cleared
up.  Seems to me the confusion is from the document saying
(paraphrased): "white space is removed from both ends".

Perhaps it should say something like "runs of 1 or more whitespace are
collapsed (up to the maximum split), and then split on" or simply "split
on runs of 1 or more whitespace.  In other words, 3 spaces together
would be treated as a single split-point instead of 3 0-length fields
separated by spaces."

So, in the first example provided by "nirs" in this issue, "both ends"
refers to both the left and right side of "k:".  Since maxsplit is 1,
the second part (v) is left untouched.  This is the intended operation.

This is a documentation bug, not a library bug.

Fred: Thoughts on wording?

----------
assignee:  -> fdrake
components: +Documentation -Library (Lib)
nosy: +fdrake, jafo
priority:  -> low

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1123>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to