[Python-checkins] cpython: whatsnew: afic.open supports 'with'.

r.david.murray python-checkins at python.org
Tue Dec 31 23:03:07 CET 2013


http://hg.python.org/cpython/rev/f6ce2284e8dd
changeset:   88234:f6ce2284e8dd
user:        R David Murray <rdmurray at bitdance.com>
date:        Tue Dec 31 13:45:38 2013 -0500
summary:
  whatsnew: afic.open supports 'with'.

files:
  Doc/library/aifc.rst |  4 ++--
  Doc/whatsnew/3.4.rst |  5 +++++
  2 files changed, 7 insertions(+), 2 deletions(-)


diff --git a/Doc/library/aifc.rst b/Doc/library/aifc.rst
--- a/Doc/library/aifc.rst
+++ b/Doc/library/aifc.rst
@@ -54,8 +54,8 @@
    The :func:`.open` function may be used in a :keyword:`with` statement.  When
    the :keyword:`with` block completes, the :meth:`~aifc.close` method is called.
 
-.. versionchanged:: 3.4
-   Support for the :keyword:`with` statement was added.
+   .. versionchanged:: 3.4
+      Support for the :keyword:`with` statement was added.
 
 Objects returned by :func:`.open` when a file is opened for reading have the
 following methods:
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -494,6 +494,11 @@
 The :meth:`~aifc.getparams` method now returns a namedtuple rather than a
 plain tuple.  (Contributed by Claudiu Popa in :issue:`17818`.)
 
+:func:`aifc.open` now supports the context manager protocol: when used in a
+:keyword:`with` block, the :meth:`~aifc.aifc.close` method of the returned
+object will be called automatically at the end of the block.  (Contributed by
+Serhiy Storchacha in :issue:`16486`.)
+
 
 argparse
 --------

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list