Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8de44b

Browse files
author
Alessandro Cucci
committed
Issue #24729: Update tutorial to match implementation.
1 parent 111803c commit d8de44b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/tutorial/inputoutput.rst

Lines changed: 3 additions & 3 deletions
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 :func:`~functions.open`).
252+
``'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-

0 commit comments

Comments
 (0)