There was an error while loading. Please reload this page.
2 parents f8d5063 + dcf841b commit 0598da3Copy full SHA for 0598da3
2 files changed
Doc/tutorial/inputoutput.rst
@@ -247,8 +247,9 @@ writing. The *mode* argument is optional; ``'r'`` will be assumed if it's
247
omitted.
248
249
Normally, files are opened in :dfn:`text mode`, that means, you read and write
250
-strings from and to the file, which are encoded in a specific encoding (the
251
-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
252
+:func:`open`). ``'b'`` appended to the mode opens the file in
253
:dfn:`binary mode`: now the data is read and written in the form of bytes
254
objects. This mode should be used for all files that don't contain text.
255
@@ -437,4 +438,3 @@ The reference for the :mod:`json` module contains an explanation of this.
437
438
written in other languages. It is also insecure by default:
439
deserializing pickle data coming from an untrusted source can execute
440
arbitrary code, if the data was crafted by a skilled attacker.
-
Misc/NEWS
@@ -28,6 +28,9 @@ Documentation
28
29
- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
30
31
+- Issue #24729: Correct IO tutorial to match implementation regarding
32
+ encoding parameter to open function.
33
+
34
35
What's New in Python 3.5.0 beta 4?
36
==================================
0 commit comments