Neil Schemenauer <nas-pyt...@arctrix.com> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue18291>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to