summaryrefslogtreecommitdiffstats
path: root/Doc/library/gzip.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/gzip.rst')
-rw-r--r--Doc/library/gzip.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/gzip.rst b/Doc/library/gzip.rst
index fa73bba..c76bae8 100644
--- a/Doc/library/gzip.rst
+++ b/Doc/library/gzip.rst
@@ -53,7 +53,7 @@ The module defines the following items:
``9`` is slowest and produces the most compression. The default is ``9``.
The *mtime* argument is an optional numeric timestamp to be written to
- the stream when compressing. All :program:`gzip`compressed streams are
+ the stream when compressing. All :program:`gzip` compressed streams are
required to contain a timestamp. If omitted or ``None``, the current
time is used. This module ignores the timestamp when decompressing;
however, some programs, such as :program:`gunzip`\ , make use of it.
@@ -67,6 +67,11 @@ The module defines the following items:
writing as *fileobj*, and retrieve the resulting memory buffer using the
:class:`StringIO` object's :meth:`getvalue` method.
+ :class:`GzipFile` supports the :keyword:`with` statement.
+
+ .. versionchanged:: 2.7
+ Support for the :keyword:`with` statement was added.
+
.. function:: open(filename[, mode[, compresslevel]])