summaryrefslogtreecommitdiff
path: root/Doc/library/bz2.rst
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-03-12 22:48:16 +0000
committerEzio Melotti <ezio.melotti@gmail.com>2010-03-12 22:48:16 +0000
commitca19c17423945c158a764e2c1b23f14cb2a01a11 (patch)
treedbd0c7e0e6fd0c597c28d4988d434538eb011a1b /Doc/library/bz2.rst
parentecc3e9252e6b8e470cd6bdc345414e020c322c74 (diff)
downloadcpython-ca19c17423945c158a764e2c1b23f14cb2a01a11.tar.gz
Merged revisions 78884 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r78884 | ezio.melotti | 2010-03-13 00:45:38 +0200 (Sat, 13 Mar 2010) | 1 line #8057: fix strings -> byte strings ........
Diffstat (limited to 'Doc/library/bz2.rst')
-rw-r--r--Doc/library/bz2.rst22
1 files changed, 12 insertions, 10 deletions
diff --git a/Doc/library/bz2.rst b/Doc/library/bz2.rst
index a2272e6b7b..b3a3215963 100644
--- a/Doc/library/bz2.rst
+++ b/Doc/library/bz2.rst
@@ -73,15 +73,16 @@ Handling of compressed files is offered by the :class:`BZ2File` class.
.. method:: read([size])
- Read at most *size* uncompressed bytes, returned as a string. If the
+ Read at most *size* uncompressed bytes, returned as a byte string. If the
*size* argument is negative or omitted, read until EOF is reached.
.. method:: readline([size])
- Return the next line from the file, as a string, retaining newline. A
- non-negative *size* argument limits the maximum number of bytes to return
- (an incomplete line may be returned then). Return an empty string at EOF.
+ Return the next line from the file, as a byte string, retaining newline.
+ A non-negative *size* argument limits the maximum number of bytes to
+ return (an incomplete line may be returned then). Return an empty byte
+ string at EOF.
.. method:: readlines([size])
@@ -111,15 +112,16 @@ Handling of compressed files is offered by the :class:`BZ2File` class.
.. method:: write(data)
- Write string *data* to file. Note that due to buffering, :meth:`close` may
- be needed before the file on disk reflects the data written.
+ Write the byte string *data* to file. Note that due to buffering,
+ :meth:`close` may be needed before the file on disk reflects the data
+ written.
- .. method:: writelines(sequence_of_strings)
+ .. method:: writelines(sequence_of_byte_strings)
- Write the sequence of strings to the file. Note that newlines are not
- added. The sequence can be any iterable object producing strings. This is
- equivalent to calling write() for each string.
+ Write the sequence of byte strings to the file. Note that newlines are not
+ added. The sequence can be any iterable object producing byte strings.
+ This is equivalent to calling write() for each byte string.
Sequential (de)compression