Inada Naoki added the comment:
> It would be better to name it keepends and set it True by default.
.readline() returns only one line. Should we use plural form for consistency?
> It is also not good for file-like classes which do not inherit IOBase, but
> implement a part of methods. You c
Serhiy Storchaka added the comment:
It would be better to name it keepends and set it True by default.
I wanted this feature. The problem is that it is not just concrete
implementation, it is an interface. Adding new parameters for IOBase methods
will break all IOBase subclasses. And there a
New submission from Inada Naoki :
str.splitlines() has `keepends` option.
Like that, `IOBase.readline([trimend=False])` and
`IOBase.readlines([trimends=False])` would be useful.
--
components: IO
messages: 363430
nosy: inada.naoki
priority: normal
severity: normal
status: open
title: A