summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-08-03 23:18:56 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-08-03 23:18:56 (GMT)
commit401e17d0f06dd6594835424c5544689abdc0cc9f (patch)
tree7ed5e7ac7d7422b0c07f9c99f018722fd9cf568f /Modules
parent0c1c0d42dcc8fc223eb3aaa51d09d252b1738820 (diff)
downloadcpython-401e17d0f06dd6594835424c5544689abdc0cc9f.zip
cpython-401e17d0f06dd6594835424c5544689abdc0cc9f.tar.gz
cpython-401e17d0f06dd6594835424c5544689abdc0cc9f.tar.bz2
open() / TextIOWrapper doc: make it explicit than newline='\n' doesn't
translate newlines on output.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/_iomodule.c6
-rw-r--r--Modules/_io/textio.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_io/_iomodule.c b/Modules/_io/_iomodule.c
index 4c90433..5987679 100644
--- a/Modules/_io/_iomodule.c
+++ b/Modules/_io/_iomodule.c
@@ -264,9 +264,9 @@ PyDoc_STRVAR(open_doc,
"\n"
"* On output, if newline is None, any '\\n' characters written are\n"
" translated to the system default line separator, os.linesep. If\n"
-" newline is '', no translation takes place. If newline is any of the\n"
-" other legal values, any '\\n' characters written are translated to\n"
-" the given string.\n"
+" newline is '' or '\n', no translation takes place. If newline is any\n"
+" of the other legal values, any '\\n' characters written are translated\n"
+" to the given string.\n"
"\n"
"If closefd is False, the underlying file descriptor will be kept open\n"
"when the file is closed. This does not work when a file name is given\n"
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 518108b..2d516ee 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -635,9 +635,9 @@ PyDoc_STRVAR(textiowrapper_doc,
"\n"
"* On output, if newline is None, any '\\n' characters written are\n"
" translated to the system default line separator, os.linesep. If\n"
- " newline is '', no translation takes place. If newline is any of the\n"
- " other legal values, any '\\n' characters written are translated to\n"
- " the given string.\n"
+ " newline is '' or '\n', no translation takes place. If newline is any\n"
+ " of the other legal values, any '\\n' characters written are translated\n"
+ " to the given string.\n"
"\n"
"If line_buffering is True, a call to flush is implied when a call to\n"
"write contains a newline character."