FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bz2 module: Rewrap docstrings at 72 columns, as per PEP 8. · python/cpython@4907b0a · GitHub

Repository navigation

Commit 4907b0a

Browse files
committed
bz2 module: Rewrap docstrings at 72 columns, as per PEP 8.
1 parent 3b4a4f5 commit 4907b0a

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

‎Lib/bz2.py‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ class BZ2File(io.BufferedIOBase):
4444
def __init__(self, filename, mode="r", buffering=None, compresslevel=9):
4545
"""Open a bzip2-compressed file.
4646
47-
If filename is a str or bytes object, is gives the name of the file to
48-
be opened. Otherwise, it should be a file object, which will be used to
49-
read or write the compressed data.
47+
If filename is a str or bytes object, it gives the name
48+
of the file to be opened. Otherwise, it should be a file object,
49+
which will be used to read or write the compressed data.
5050
51-
mode can be 'r' for reading (default), 'w' for (over)writing, or 'a' for
52-
appending. These can equivalently be given as 'rb', 'wb', and 'ab'.
51+
mode can be 'r' for reading (default), 'w' for (over)writing,
52+
or 'a' for appending. These can equivalently be given as 'rb',
53+
'wb', and 'ab'.
5354
5455
buffering is ignored. Its use is deprecated.
5556
@@ -439,20 +440,20 @@ def open(filename, mode="rb", compresslevel=9,
439440
encoding=None, errors=None, newline=None):
440441
"""Open a bzip2-compressed file in binary or text mode.
441442
442-
The filename argument can be an actual filename (a str or bytes object), or
443-
an existing file object to read from or write to.
443+
The filename argument can be an actual filename (a str or bytes
444+
object), or an existing file object to read from or write to.
444445
445-
The mode argument can be "r", "rb", "w", "wb", "a" or "ab" for binary mode,
446-
or "rt", "wt" or "at" for text mode. The default mode is "rb", and the
447-
default compresslevel is 9.
446+
The mode argument can be "r", "rb", "w", "wb", "a" or "ab" for
447+
binary mode, or "rt", "wt" or "at" for text mode. The default mode
448+
is "rb", and the default compresslevel is 9.
448449
449-
For binary mode, this function is equivalent to the BZ2File constructor:
450-
BZ2File(filename, mode, compresslevel). In this case, the encoding, errors
451-
and newline arguments must not be provided.
450+
For binary mode, this function is equivalent to the BZ2File
451+
constructor: BZ2File(filename, mode, compresslevel). In this case,
452+
the encoding, errors and newline arguments must not be provided.
452453
453454
For text mode, a BZ2File object is created, and wrapped in an
454-
io.TextIOWrapper instance with the specified encoding, error handling
455-
behavior, and line ending(s).
455+
io.TextIOWrapper instance with the specified encoding, error
456+
handling behavior, and line ending(s).
456457
457458
"""
458459
if "t" in mode:

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL