Skip to content

Commit dcf841b

Browse files
committed
Merge
2 parents bd4dd54 + 842c074 commit dcf841b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Doc/tutorial/inputoutput.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,9 @@ writing. The *mode* argument is optional; ``'r'`` will be assumed if it's
247247
omitted.
248248

249249
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
250+
strings from and to the file, which are encoded in a specific encoding. If
251+
encoding is not specified, the default is platform dependent (see
252+
:func:`open`). ``'b'`` appended to the mode opens the file in
252253
:dfn:`binary mode`: now the data is read and written in the form of bytes
253254
objects. This mode should be used for all files that don't contain text.
254255

@@ -437,4 +438,3 @@ The reference for the :mod:`json` module contains an explanation of this.
437438
written in other languages. It is also insecure by default:
438439
deserializing pickle data coming from an untrusted source can execute
439440
arbitrary code, if the data was crafted by a skilled attacker.
440-

Misc/NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,9 @@ Documentation
398398

399399
- Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan.
400400

401+
- Issue #24729: Correct IO tutorial to match implementation regarding
402+
encoding parameter to open function.
403+
401404
- Issue #24351: Clarify what is meant by "identifier" in the context of
402405
string.Template instances.
403406

0 commit comments

Comments
 (0)