summaryrefslogtreecommitdiff
path: root/Doc/library/gzip.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-09-29 10:49:46 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2010-09-29 10:49:46 +0000
commitbed3f8c57db46a6adfd691bf43aa63479edd0c84 (patch)
treee8f0264b910f7d05080cbc924b91304fe88cfe2d /Doc/library/gzip.rst
parent161a11c603c8b03ac6a03340023cffbd05ad1942 (diff)
downloadcpython-bed3f8c57db46a6adfd691bf43aa63479edd0c84.tar.gz
Issue #9962: GzipFile now has the peek() method.
Diffstat (limited to 'Doc/library/gzip.rst')
-rw-r--r--Doc/library/gzip.rst16
1 files changed, 10 insertions, 6 deletions
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst
index dc04ba0b17..0ae23d2d6b 100644
--- a/Doc/library/gzip.rst
+++ b/Doc/library/gzip.rst
@@ -25,10 +25,10 @@ The module defines the following items:
.. class:: GzipFile(filename=None, mode=None, compresslevel=9, fileobj=None, mtime=None)
- Constructor for the :class:`GzipFile` class, which simulates most of the methods
- of a :term:`file object`, with the exception of the :meth:`readinto` and
- :meth:`truncate` methods. At least one of *fileobj* and *filename* must be
- given a non-trivial value.
+ Constructor for the :class:`GzipFile` class, which simulates most of the
+ methods of a :term:`file object`, with the exception of the :meth:`truncate`
+ method. At least one of *fileobj* and *filename* must be given a non-trivial
+ value.
The new class instance is based on *fileobj*, which can be a regular file, a
:class:`StringIO` object, or any other object which simulates a file. It
@@ -66,8 +66,9 @@ The module defines the following items:
writing as *fileobj*, and retrieve the resulting memory buffer using the
:class:`io.BytesIO` object's :meth:`~io.BytesIO.getvalue` method.
- :class:`GzipFile` supports the whole :class:`io.BufferedIOBase` interface,
- including iteration and the :keyword:`with` statement.
+ :class:`GzipFile` supports the :class:`io.BufferedIOBase` interface,
+ including iteration and the :keyword:`with` statement. Only the
+ :meth:`truncate` method isn't implemented.
.. versionchanged:: 3.1
Support for the :keyword:`with` statement was added.
@@ -78,6 +79,9 @@ The module defines the following items:
.. versionchanged:: 3.2
Support for unseekable files was added.
+ .. versionchanged:: 3.2
+ The :meth:`peek` method was implemented.
+
.. function:: open(filename, mode='rb', compresslevel=9)