cpython: f17a1410ebe5 (original) (raw)

Mercurial > cpython

changeset 78401:f17a1410ebe5

Make TextIOWrapper's documentation clearer by copying the newline argument's description from open().

Antoine Pitrou solipsis@pitrou.net
date Sat, 04 Aug 2012 00:56:19 +0200
parents 593eba5e867c(current diff)f19bea7bbee7(diff)
children 083776adcacc
files Doc/library/io.rst Modules/_io/textio.c
diffstat 2 files changed, 32 insertions(+), 17 deletions(-)[+] [-] Doc/library/io.rst 24 Modules/_io/textio.c 25

line wrap: on

line diff

--- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -767,14 +767,22 @@ Text I/O sequences) can be used. Any other error handling name that has been registered with :func:codecs.register_error is also valid.

+

If line_buffering is True, :meth:flush is implied when a call to write contains a newline character.

--- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -635,15 +635,22 @@ PyDoc_STRVAR(textiowrapper_doc, "errors determines the strictness of encoding and decoding (see the\n" "codecs.register) and defaults to "strict".\n" "\n"