New submission from Christoph Anton Mitterer <cales...@scientia.org>:

Hey.

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
"abc\r\n"
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".


Cheers,
Chris.

----------
assignee: docs@python
components: Documentation
messages: 387758
nosy: calestyo, docs@python
priority: normal
severity: normal
status: open
title: document whether io.TextIOBase.readline(size>0) will always read the 
full newline

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43336>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to