From bb668f798a78af0fd99675a4c7e0d949591f4f2b Mon Sep 17 00:00:00 2001 From: Richard Sanger Date: Tue, 10 Sep 2019 03:49:47 +1200 Subject: [PATCH] Fix docs bz.open default mode (GH-15100) bz2.open()'s default mode is rb, not r --- Doc/library/bz2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index 277de601cb7..aa836af2b25 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -31,7 +31,7 @@ All of the classes in this module may safely be accessed from multiple threads. (De)compression of files ------------------------ -.. function:: open(filename, mode='r', compresslevel=9, encoding=None, errors=None, newline=None) +.. function:: open(filename, mode='rb', compresslevel=9, encoding=None, errors=None, newline=None) Open a bzip2-compressed file in binary or text mode, returning a :term:`file object`.