[docs] [issue15554] correct and clarify str.splitlines() documentation
R. David Murray
report at bugs.python.org
Sun Aug 5 00:13:55 CEST 2012
R. David Murray added the comment:
Sigh. ;)
At this point in my Python programming I intuitively understand what splitlines does, but every time we try to explain it in detail it gets messier and messier. I wasn't really happy with the addition of that sentence about split in the first place.
I don't understand what your splitlines examples are trying to say, they all look clear to me based on the fact that we are splitting *lines*.
I don't find your proposed language in the patch to be clearer. The existing sentence describes the concrete behavior, while your version is sort-of describing (ascribing?) some syntax to the line separators ("does not delimit"). The problem is that there *is* a syntax here, that of universal-newline-delimited-text, but that is too big a topic to explain in the splitlines doc. There's another issue for creating a central description of universal-newline parsing, perhaps this entry could link to that discussion (and that discussion could perhaps mention splitlines).
The split behavior without a specified separator might actually be a bug (if so, it is not a fixable one), but in any case you are right that that clarification should be added if the existing sentence is kept.
----------
nosy: +ncoghlan, r.david.murray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15554>
_______________________________________
More information about the docs
mailing list