[Python-checkins] cpython: Update docstring for BZ2File.__init__().

nadeem.vawda python-checkins at python.org
Sat Feb 4 14:17:07 CET 2012


http://hg.python.org/cpython/rev/93bab621d053
changeset:   74755:93bab621d053
user:        Nadeem Vawda <nadeem.vawda at gmail.com>
date:        Sat Feb 04 13:08:11 2012 +0200
summary:
  Update docstring for BZ2File.__init__().

files:
  Lib/bz2.py |  10 +++++++---
  1 files changed, 7 insertions(+), 3 deletions(-)


diff --git a/Lib/bz2.py b/Lib/bz2.py
--- a/Lib/bz2.py
+++ b/Lib/bz2.py
@@ -47,13 +47,17 @@
         the file object given by fileobj. Exactly one of these two
         parameters should be provided.
 
-        mode can be 'r' for reading (default), or 'w' for writing.
+        mode can be 'r' for reading (default), 'w' for (over)writing, or
+        'a' for appending.
 
         buffering is ignored. Its use is deprecated.
 
-        If mode is 'w', compresslevel can be a number between 1 and 9
-        specifying the level of compression: 1 produces the least
+        If mode is 'w' or 'a', compresslevel can be a number between 1
+        and 9 specifying the level of compression: 1 produces the least
         compression, and 9 (default) produces the most compression.
+
+        If mode is 'r', the input file may be the concatenation of
+        multiple compressed streams.
         """
         # This lock must be recursive, so that BufferedIOBase's
         # readline(), readlines() and writelines() don't deadlock.

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


More information about the Python-checkins mailing list