[Python-checkins] r71332 - python/branches/py3k/Doc/whatsnew/3.1.rst
raymond.hettinger
python-checkins at python.org
Tue Apr 7 00:39:03 CEST 2009
Author: raymond.hettinger
Date: Tue Apr 7 00:39:03 2009
New Revision: 71332
Log:
Add example. Fix spelling. Fix patch attribution.
Modified:
python/branches/py3k/Doc/whatsnew/3.1.rst
Modified: python/branches/py3k/Doc/whatsnew/3.1.rst
==============================================================================
--- python/branches/py3k/Doc/whatsnew/3.1.rst (original)
+++ python/branches/py3k/Doc/whatsnew/3.1.rst Tue Apr 7 00:39:03 2009
@@ -158,10 +158,14 @@
(Contributed by Kevin Walzer and Guilherme Polo; :issue:`2618` and
:issue:`2983`.)
-* The :class:`gzip.GzipFile` and :class:`bz2.BZ2File` classs now support
- the context manager protocol.
+* The :class:`gzip.GzipFile` and :class:`bz2.BZ2File` classes now support
+ the context manager protocol::
- (Contributed by Jacques Frechet; :issue:`4272`.)
+ >>> # Automatically close file after writing
+ >>> with gzip.GzipFile(filename, "wb") as f:
+ ... f.write(b"xxx")
+
+ (Contributed by Antoine Pitrou.)
* The :mod:`Decimal` module now supports two new methods to create a
decimal object that from a binary :class:`float`. The conversion is
More information about the Python-checkins
mailing list