diff options
author | Stanley <46876382+slateny@users.noreply.github.com> | 2022-10-21 23:01:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-21 23:01:05 (GMT) |
commit | d9407b174c81fda33e6c09a6f988c9a7cb8368af (patch) | |
tree | 71340d046fce25463b7e37ae25c05d42036bf0c6 /Doc | |
parent | 4c1145bb3796c550d477c8c154ff980d566fe4a2 (diff) | |
download | cpython-d9407b174c81fda33e6c09a6f988c9a7cb8368af.zip cpython-d9407b174c81fda33e6c09a6f988c9a7cb8368af.tar.gz cpython-d9407b174c81fda33e6c09a6f988c9a7cb8368af.tar.bz2 |
gh-51511: Note that codecs.open()'s encoding parameter affects automatic conversion to binary mode (#94370)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/codecs.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/codecs.rst b/Doc/library/codecs.rst index 4a665f2..8225236 100644 --- a/Doc/library/codecs.rst +++ b/Doc/library/codecs.rst @@ -189,7 +189,8 @@ wider range of codecs when working with binary files: .. note:: - Underlying encoded files are always opened in binary mode. + If *encoding* is not ``None``, then the + underlying encoded files are always opened in binary mode. No automatic conversion of ``'\n'`` is done on reading and writing. The *mode* argument may be any binary mode acceptable to the built-in :func:`open` function; the ``'b'`` is automatically added. |