This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients Alexander Schrijver, barry, docs@python, ezio.melotti, gregory.p.smith, jwilk, martin.panter, nascheme, python-dev, r.david.murray, scharron, serhiy.storchaka, terry.reedy, vstinner
Date 2018-10-05.06:42:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538721754.98.0.545547206417.issue22232@psf.upfronthosting.co.za>
In-reply-to
Content
If change the default behavior we need to wait several releases after adding this option. Users should be able to pick the current behavior explicitly.

Currently the workaround is using regular expressions.

For s.splitlines(keepends=False):

    re.split(r'\n|\r\n?', s)

For s.splitlines(keepends=True):

    re.split(r'(?<=\n)|(?<=\r)(?!\n)', s)
History
Date User Action Args
2018-10-05 06:42:35serhiy.storchakasetrecipients: + serhiy.storchaka, barry, nascheme, terry.reedy, gregory.p.smith, vstinner, jwilk, ezio.melotti, r.david.murray, docs@python, python-dev, martin.panter, scharron, Alexander Schrijver
2018-10-05 06:42:34serhiy.storchakasetmessageid: <1538721754.98.0.545547206417.issue22232@psf.upfronthosting.co.za>
2018-10-05 06:42:34serhiy.storchakalinkissue22232 messages
2018-10-05 06:42:34serhiy.storchakacreate