[New-bugs-announce] [issue43336] document whether io.TextIOBase.readline(size>0) will always read the full newline
Christoph Anton Mitterer
report at bugs.python.org
Fri Feb 26 21:15:37 EST 2021
New submission from Christoph Anton Mitterer <calestyo at scientia.org>:
It would be nice if the following behaviour could be definitely clarified:
When reading from a text stream with readline(size) with a n > 0size it says: "If size is specified, at most size characters will be read."
Also, depending on the settings of newlines of the stream, \r\n would be converted to \n.
It's not definitely clear whether a string like
read with a size of = 4 will return "abc\n" (which it seems to do, in other words, it reads actually 5 characters, but sill returns only 4), or whether it returns "abc\r".
assignee: docs at python
nosy: calestyo, docs at python
title: document whether io.TextIOBase.readline(size>0) will always read the full newline
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce