classification
Title: Improve docs for str.splitlines
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.araujo, michael.driscoll, ncoghlan, python-dev, r.david.murray
Priority: normal Keywords: easy, patch

Created on 2012-05-29 22:34 by ncoghlan, last changed 2012-06-02 15:21 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
stdtypes.patch michael.driscoll, 2012-06-01 19:56 patch for str documentation review
Messages (5)
msg161915 - (view) Author: Nick Coghlan (ncoghlan) * (Python committer) Date: 2012-05-29 22:34
The docs for str.splitlines() should explain:

1. That it uses the universal newlines approach to splitting lines
2. That unlike str.split() a trailing empty line is *not* included in the resulting list
msg162102 - (view) Author: Michael Driscoll (michael.driscoll) * Date: 2012-06-01 19:56
I'm assuming Nick is talking about the stdtypes.rst (in Doc/library) file, correct? If so, I went ahead and created a simple patch that almost uses his verbiage verbatim.
msg162104 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-01 20:21
New changeset 24572015e24f by R David Murray in branch '3.2':
#14957: clarify splitlines docs.
http://hg.python.org/cpython/rev/24572015e24f

New changeset 2a43088318ed by R David Murray in branch 'default':
#14957: clarify splitlines docs.
http://hg.python.org/cpython/rev/2a43088318ed

New changeset 0df7594e4ebd by R David Murray in branch '2.7':
#14957: clarify splitlines docs.
http://hg.python.org/cpython/rev/0df7594e4ebd
msg162105 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-01 20:22
Thanks.  I added an example, too, since split has some.
msg162142 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-02 15:21
New changeset 4d9b3a58e208 by R David Murray in branch '3.2':
#14957: fix doc typo.
http://hg.python.org/cpython/rev/4d9b3a58e208

New changeset 3bb35ad5d9da by R David Murray in branch 'default':
#14957: fix doc typo.
http://hg.python.org/cpython/rev/3bb35ad5d9da

New changeset 48564362b687 by R David Murray in branch '2.7':
#14957: fix doc typo.
http://hg.python.org/cpython/rev/48564362b687
History
Date User Action Args
2012-06-02 15:21:48python-devsetmessages: + msg162142
2012-06-01 20:22:28r.david.murraysetstatus: open -> closed

type: behavior

nosy: + r.david.murray
messages: + msg162105
resolution: fixed
stage: needs patch -> resolved
2012-06-01 20:21:23python-devsetnosy: + python-dev
messages: + msg162104
2012-06-01 19:56:25michael.driscollsetfiles: + stdtypes.patch

nosy: + michael.driscoll
messages: + msg162102

keywords: + patch
2012-06-01 02:43:09eric.araujosetkeywords: + easy
nosy: + eric.araujo

stage: needs patch
2012-05-29 22:34:50ncoghlancreate