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:
Miss Islington (bot) 2022-10-21 16:28:25 -07:00 committed by GitHub
parent 0e4e058602
commit dcb342b5f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -705,7 +705,8 @@ def test_decoder_state(self):
"spamspam", self.spambe)
def test_bug691291(self):
# Files are always opened in binary mode, even if no binary mode was
# If encoding is not None, then
# files are always opened in binary mode, even if no binary mode was
# specified. This means that no automatic conversion of '\n' is done
# on reading and writing.
s1 = 'Hello\r\nworld\r\n'