mirror of
https://github.com/python/cpython.git
synced 2025-09-04 16:01:10 +00:00
gh-51511: Note that codecs.open()'s encoding parameter affects automatic conversion to binary mode (GH-94370)
(cherry picked from commit d9407b174c
)
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
This commit is contained in:
parent
68f25e261e
commit
c835b97c5f
3 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue