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 <rep...@bugs.python.org>
<http://bugs.python.org/issue22069>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to