From d8de44b6b3b36ec76154e7107891106451d6e7de Mon Sep 17 00:00:00 2001 From: Alessandro Cucci Date: Tue, 28 Jul 2015 21:00:10 +0200 Subject: Issue #24729: Update tutorial to match implementation. --- Doc/tutorial/inputoutput.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 6f9c99d..29dc948 100644 --- a/Doc/tutorial/inputoutput.rst +++ b/Doc/tutorial/inputoutput.rst @@ -247,8 +247,9 @@ writing. The *mode* argument is optional; ``'r'`` will be assumed if it's omitted. Normally, files are opened in :dfn:`text mode`, that means, you read and write -strings from and to the file, which are encoded in a specific encoding (the -default being UTF-8). ``'b'`` appended to the mode opens the file in +strings from and to the file, which are encoded in a specific encoding. If +encoding is not specified the default is platform dependent (see :func:`~functions.open`). +``'b'`` appended to the mode opens the file in :dfn:`binary mode`: now the data is read and written in the form of bytes objects. This mode should be used for all files that don't contain text. @@ -437,4 +438,3 @@ The reference for the :mod:`json` module contains an explanation of this. written in other languages. It is also insecure by default: deserializing pickle data coming from an untrusted source can execute arbitrary code, if the data was crafted by a skilled attacker. - -- cgit v0.12 From 842c07414e336dce7a9ec74e1b7cedae2f7dd5ad Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 29 Jul 2015 14:04:36 -0400 Subject: Issue #24729: Correct reference to open function. --- Doc/tutorial/inputoutput.rst | 4 ++-- Misc/NEWS | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 29dc948..c157f22 100644 --- a/Doc/tutorial/inputoutput.rst +++ b/Doc/tutorial/inputoutput.rst @@ -248,8 +248,8 @@ omitted. Normally, files are opened in :dfn:`text mode`, that means, you read and write strings from and to the file, which are encoded in a specific encoding. If -encoding is not specified the default is platform dependent (see :func:`~functions.open`). -``'b'`` appended to the mode opens the file in +encoding is not specified, the default is platform dependent (see +:func:`open`). ``'b'`` appended to the mode opens the file in :dfn:`binary mode`: now the data is read and written in the form of bytes objects. This mode should be used for all files that don't contain text. diff --git a/Misc/NEWS b/Misc/NEWS index 8626757..63c0c71 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -396,6 +396,9 @@ C API Documentation ------------- +- Issue #24729: Correct IO tutorial to match implementation regarding + encoding parameter to open function. + - Issue #24351: Clarify what is meant by "identifier" in the context of string.Template instances. -- cgit v0.12