diff options
author | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-06-04 21:31:22 (GMT) |
---|---|---|
committer | Nadeem Vawda <nadeem.vawda@gmail.com> | 2012-06-04 21:31:22 (GMT) |
commit | 50cb936bd0fe2645d975f6acf519caa606fc82d3 (patch) | |
tree | 39d6537bc04e63496fadd2369cef4eb5ebffec1e /Doc/library/bz2.rst | |
parent | aebcdba8297bf5174ecf4e8687ad23883e35b14b (diff) | |
download | cpython-50cb936bd0fe2645d975f6acf519caa606fc82d3.zip cpython-50cb936bd0fe2645d975f6acf519caa606fc82d3.tar.gz cpython-50cb936bd0fe2645d975f6acf519caa606fc82d3.tar.bz2 |
Clarify acceptable values for BZ2File.__init__'s mode argument.
Diffstat (limited to 'Doc/library/bz2.rst')
-rw-r--r-- | Doc/library/bz2.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst index de5c825..893bb9b 100644 --- a/Doc/library/bz2.rst +++ b/Doc/library/bz2.rst @@ -35,9 +35,11 @@ All of the classes in this module may safely be accessed from multiple threads. be used to read or write the compressed data. The *mode* argument can be either ``'r'`` for reading (default), ``'w'`` for - overwriting, or ``'a'`` for appending. If *filename* is a file object (rather - than an actual file name), a mode of ``'w'`` does not truncate the file, and - is instead equivalent to ``'a'``. + overwriting, or ``'a'`` for appending. These can equivalently be given as + ``'rb'``, ``'wb'``, and ``'ab'`` respectively. + + If *filename* is a file object (rather than an actual file name), a mode of + ``'w'`` does not truncate the file, and is instead equivalent to ``'a'``. The *buffering* argument is ignored. Its use is deprecated. |