]> granicus.if.org Git - python/commitdiff
Followup to c3b47cdea0d1: document the *write_through* argument to TextIOWrapper.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 23 Jul 2011 20:00:03 +0000 (22:00 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 23 Jul 2011 20:00:03 +0000 (22:00 +0200)
Doc/library/io.rst

index 0d8730568a21af7e836ee7ce4edfd167df623032..a76b757b1afffbed7920e8ad9fb693191640f116 100644 (file)
@@ -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: