diff options
author | Antoine Pitrou <pitrou@free.fr> | 2017-06-03 10:32:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-03 10:32:28 (GMT) |
commit | 3c2817b6884a5fcf792197203f3c26b157210607 (patch) | |
tree | 36f32bf5581fb14a60257630be600cc1077a260c /Doc | |
parent | ae8750bca8234a9af9382b9d7e457b57f810ad64 (diff) | |
download | cpython-3c2817b6884a5fcf792197203f3c26b157210607.zip cpython-3c2817b6884a5fcf792197203f3c26b157210607.tar.gz cpython-3c2817b6884a5fcf792197203f3c26b157210607.tar.bz2 |
Fix bpo-30526: Add TextIOWrapper.reconfigure() and a TextIOWrapper.write_through attribute (#1922)
* Fix bpo-30526: Add TextIOWrapper.reconfigure()
* Apply Nick's improved wording
* Update Misc/NEWS
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/io.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst index c8ff5b8..8a695ad 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -908,6 +908,24 @@ Text I/O Whether line buffering is enabled. + .. attribute:: write_through + + Whether writes are passed immediately to the underlying binary + buffer. + + .. versionadded:: 3.7 + + .. method:: reconfigure(*, line_buffering=None, write_through=None) + + Reconfigure this text stream using new settings for *line_buffering* + and *write_through*. Passing ``None`` as an argument will retain + the current setting for that parameter. + + This method does an implicit stream flush before setting the + new parameters. + + .. versionadded:: 3.7 + .. class:: StringIO(initial_value='', newline='\\n') |