summaryrefslogtreecommitdiffstats
path: root/Lib/codecs.py
diff options
context:
space:
mode:
authorStanley <46876382+slateny@users.noreply.github.com>2022-10-21 23:01:05 (GMT)
committerGitHub <noreply@github.com>2022-10-21 23:01:05 (GMT)
commitd9407b174c81fda33e6c09a6f988c9a7cb8368af (patch)
tree71340d046fce25463b7e37ae25c05d42036bf0c6 /Lib/codecs.py
parent4c1145bb3796c550d477c8c154ff980d566fe4a2 (diff)
downloadcpython-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 'Lib/codecs.py')
-rw-r--r--Lib/codecs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/codecs.py b/Lib/codecs.py
index 5a1e7ec..c1c55d8 100644
--- a/Lib/codecs.py
+++ b/Lib/codecs.py
@@ -878,7 +878,8 @@ def open(filename, mode='r', encoding=None, errors='strict', buffering=-1):
codecs. Output is also codec dependent and will usually be
Unicode as well.
- 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.
The default file mode is 'r', meaning to open the file in read mode.
encoding specifies the encoding which is to be used for the