[Python-checkins] cpython: bz2 module: Rewrap docstrings at 72 columns, as per PEP 8.

nadeem.vawda python-checkins at python.org
Mon Oct 8 20:40:25 CEST 2012


http://hg.python.org/cpython/rev/a61b3faa1c61
changeset:   79597:a61b3faa1c61
user:        Nadeem Vawda <nadeem.vawda at gmail.com>
date:        Mon Oct 08 20:31:34 2012 +0200
summary:
  bz2 module: Rewrap docstrings at 72 columns, as per PEP 8.

files:
  Lib/bz2.py |  31 ++++++++++++++++---------------
  1 files changed, 16 insertions(+), 15 deletions(-)


diff --git a/Lib/bz2.py b/Lib/bz2.py
--- a/Lib/bz2.py
+++ b/Lib/bz2.py
@@ -44,12 +44,13 @@
     def __init__(self, filename, mode="r", buffering=None, compresslevel=9):
         """Open a bzip2-compressed file.
 
-        If filename is a str or bytes object, is gives the name of the file to
-        be opened. Otherwise, it should be a file object, which will be used to
-        read or write the compressed data.
+        If filename is a str or bytes object, it gives the name
+        of the file to be opened. Otherwise, it should be a file object,
+        which will be used to read or write the compressed data.
 
-        mode can be 'r' for reading (default), 'w' for (over)writing, or 'a' for
-        appending. These can equivalently be given as 'rb', 'wb', and 'ab'.
+        mode can be 'r' for reading (default), 'w' for (over)writing,
+        or 'a' for appending. These can equivalently be given as 'rb',
+        'wb', and 'ab'.
 
         buffering is ignored. Its use is deprecated.
 
@@ -439,20 +440,20 @@
          encoding=None, errors=None, newline=None):
     """Open a bzip2-compressed file in binary or text mode.
 
-    The filename argument can be an actual filename (a str or bytes object), or
-    an existing file object to read from or write to.
+    The filename argument can be an actual filename (a str or bytes
+    object), or an existing file object to read from or write to.
 
-    The mode argument can be "r", "rb", "w", "wb", "a" or "ab" for binary mode,
-    or "rt", "wt" or "at" for text mode. The default mode is "rb", and the
-    default compresslevel is 9.
+    The mode argument can be "r", "rb", "w", "wb", "a" or "ab" for
+    binary mode, or "rt", "wt" or "at" for text mode. The default mode
+    is "rb", and the default compresslevel is 9.
 
-    For binary mode, this function is equivalent to the BZ2File constructor:
-    BZ2File(filename, mode, compresslevel). In this case, the encoding, errors
-    and newline arguments must not be provided.
+    For binary mode, this function is equivalent to the BZ2File
+    constructor: BZ2File(filename, mode, compresslevel). In this case,
+    the encoding, errors and newline arguments must not be provided.
 
     For text mode, a BZ2File object is created, and wrapped in an
-    io.TextIOWrapper instance with the specified encoding, error handling
-    behavior, and line ending(s).
+    io.TextIOWrapper instance with the specified encoding, error
+    handling behavior, and line ending(s).
 
     """
     if "t" in mode:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list