On Tue, Jun 21, 2022 at 3:49 AM Marco Sulla
<marco.sulla.pyt...@gmail.com> wrote:
>
> On Sun, 19 Jun 2022 at 03:06, Inada Naoki <songofaca...@gmail.com> wrote:
> > FWIW, I had proposed str.iterlines() to fix incompatibility between
> > IO.readlines() and str.splitlines().
>
> It's a good idea IMHO. In your mind, str.iterlines() will find only
> \n, \r and \r\n, as IO.readlines() do? I ask this because
> str.splitlines() finds all line boundary chars.
>

I don't remember the old discussion, but I think so.

Another idea is adding some option to `splitlines()` that uses only
universal newlines. (e.g. str.splitlines(keepends=False, *,
ascii=False))
Then we can add `str.iterlines` that have the same arguments to
`str.splitlines`.

-- 
Inada Naoki  <songofaca...@gmail.com>
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/RFCO3BHIKH2KZNIA2X5LCEY2OFMRJGDX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to