Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cac8909

Browse files
committed
Update docstring for BZ2File.__init__().
1 parent ff962c5 commit cac8909

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

Lib/bz2.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@ def __init__(self, filename=None, mode="r", buffering=None,
4747
the file object given by fileobj. Exactly one of these two
4848
parameters should be provided.
4949
50-
mode can be 'r' for reading (default), or 'w' for writing.
50+
mode can be 'r' for reading (default), 'w' for (over)writing, or
51+
'a' for appending.
5152
5253
buffering is ignored. Its use is deprecated.
5354
54-
If mode is 'w', compresslevel can be a number between 1 and 9
55-
specifying the level of compression: 1 produces the least
55+
If mode is 'w' or 'a', compresslevel can be a number between 1
56+
and 9 specifying the level of compression: 1 produces the least
5657
compression, and 9 (default) produces the most compression.
58+
59+
If mode is 'r', the input file may be the concatenation of
60+
multiple compressed streams.
5761
"""
5862
# This lock must be recursive, so that BufferedIOBase's
5963
# readline(), readlines() and writelines() don't deadlock.

0 commit comments

Comments
 (0)