[New-bugs-announce] [issue22069] TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline
Akira Li
report at bugs.python.org
Fri Jul 25 18:43:43 CEST 2014
New submission from Akira Li:
TextIOWrapper(b, newline="\n", line_buffering=True) object calls flush()
while writing "\r". See test_line_buffering() method in
Lib/test/test_io.py:2114
The documentation says [1]:
> If line_buffering is True, flush() is implied when a call to write contains
> a newline character.
i.e., writing \r shouldn't force flush() if newline="\n"
[1] https://docs.python.org/3.4/library/io.html#io.TextIOWrapper
----------
components: IO
messages: 223965
nosy: akira
priority: normal
severity: normal
status: open
title: TextIOWrapper(newline="\n", line_buffering=True) mistakenly treat \r as a newline
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22069>
_______________________________________
More information about the New-bugs-announce
mailing list