[Python-checkins] cpython: Followup to c3b47cdea0d1: document the *write_through* argument to

antoine.pitrou python-checkins at python.org
Sat Jul 23 22:01:26 CEST 2011


http://hg.python.org/cpython/rev/26566bc02d1c
changeset:   71484:26566bc02d1c
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Jul 23 22:00:03 2011 +0200
summary:
  Followup to c3b47cdea0d1: document the *write_through* argument to TextIOWrapper.

files:
  Doc/library/io.rst |  10 +++++++++-
  1 files changed, 9 insertions(+), 1 deletions(-)


diff --git a/Doc/library/io.rst b/Doc/library/io.rst
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -706,7 +706,8 @@
       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 @@
    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:
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list