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 nascheme
Recipients belopolsky, doerwalter, ezio.melotti, lemburg, nascheme, r.david.murray, serhiy.storchaka, vstinner, wpk
Date 2018-10-05.03:23:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1538709824.05.0.545547206417.issue18291@psf.upfronthosting.co.za>
In-reply-to
Content
Some further progress on this.  My patch slows down reading files with the codecs module very significantly.  So, I think it could never be merged as is.  Maybe we would need to implement an alternative str.splitlines that behaves as we want, implemented in C.

Looking at the uses of str.splitlines in the stdlib, I can't help but think there are many places where this (IMHO bad) behaviour of splitting on all these extra controls characters have made it so that splitlines should not be used in most cases.  Or, we should change splitlines to work the same as the file readlines splitting.

For example, RobotFileParser uses str.splitlines().  I suspect it should only be splitting on \n characters.
History
Date User Action Args
2018-10-05 03:23:44naschemesetrecipients: + nascheme, lemburg, doerwalter, belopolsky, vstinner, ezio.melotti, r.david.murray, serhiy.storchaka, wpk
2018-10-05 03:23:44naschemesetmessageid: <1538709824.05.0.545547206417.issue18291@psf.upfronthosting.co.za>
2018-10-05 03:23:44naschemelinkissue18291 messages
2018-10-05 03:23:43naschemecreate