[issue1152248] Enhance file.readlines by making line separator selectable

Antoine Pitrou report at bugs.python.org
Fri May 15 13:34:06 CEST 2009


Antoine Pitrou <pitrou at free.fr> added the comment:

Ok, let me qualify my position a bit:
- -1 for abusing the newline parameter
- -1 for abusing readlines()
- +0 on an additional method ("readchunks" was suggested) which does the
splitting, either on a single character or on a string

Please bear in mind the latter should involve, for each of the C and
Python implementations:
- a generic unoptimized version for BufferedIOBase
- a generic unoptimized version for TextIOBase
- an optimized version for BufferedReader/BufferedRandom
- an optimized version for TextIOWrapper

However, it is certainly an interesting task for someone wanting to play
with C code, optimizations, etc.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1152248>
_______________________________________


More information about the Python-bugs-list mailing list