So it always leaves \n at the end of lines.
I would like it to have the same argument as str.splitlines(keepends=False), just with different default (for backwards compatibility).
I sometimes find myself writing:
def foo(keepends=False):
with open(...) as f:
if keepends:
lines = f.readlines()
else:
lines = f.read().splitlines(keepends=False)
...
Such would / should make code:
- simpler
- faster
- more consistent
Thank you for your time and consideration.