Message327106
| 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:35 | serhiy.storchaka | set | recipients:
+ 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:34 | serhiy.storchaka | set | messageid: <1538721754.98.0.545547206417.issue22232@psf.upfronthosting.co.za> |
| 2018年10月05日 06:42:34 | serhiy.storchaka | link | issue22232 messages |
| 2018年10月05日 06:42:34 | serhiy.storchaka | create |
|