summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-07-23 20:00:03 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-07-23 20:00:03 (GMT)
commit664091be72c8b1620cea239bf8ae0be19570709d (patch)
treea56f01e4c6d7bea70dfe51e9191f21582fdca34e
parentd42c1d09e99d74f6b411bdb1d3c8b9a648dd6a79 (diff)
downloadcpython-664091be72c8b1620cea239bf8ae0be19570709d.zip
cpython-664091be72c8b1620cea239bf8ae0be19570709d.tar.gz
cpython-664091be72c8b1620cea239bf8ae0be19570709d.tar.bz2
Followup to c3b47cdea0d1: document the *write_through* argument to TextIOWrapper.
-rw-r--r--Doc/library/io.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 0d87305..a76b757 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -706,7 +706,8 @@ Text I/O
written.
-.. class:: TextIOWrapper(buffer, encoding=None, errors=None, newline=None, line_buffering=False)
+.. class:: TextIOWrapper(buffer, encoding=None, errors=None, newline=None, \
+ line_buffering=False, write_through=False)
A buffered text stream over a :class:`BufferedIOBase` binary stream.
It inherits :class:`TextIOBase`.
@@ -737,6 +738,13 @@ Text I/O
If *line_buffering* is ``True``, :meth:`flush` is implied when a call to
write contains a newline character.
+ If *write_through* is ``True``, calls to :meth:`write` are guaranteed
+ not to be buffered: any data written on the :class:`TextIOWrapper`
+ object is immediately handled to its underlying binary *buffer*.
+
+ .. versionchanged:: 3.3
+ The *write_through* argument has been added.
+
:class:`TextIOWrapper` provides one attribute in addition to those of
:class:`TextIOBase` and its parents: