]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
whatsnew: afic.open supports 'with'.
authorR David Murray <rdmurray@bitdance.com>
Tue, 31 Dec 2013 18:45:38 +0000 (13:45 -0500)
committerR David Murray <rdmurray@bitdance.com>
Tue, 31 Dec 2013 18:45:38 +0000 (13:45 -0500)
Doc/library/aifc.rst
Doc/whatsnew/3.4.rst

index 9ffb5a3ffe9d1dfe72888c2727409b72e97f0277..caecfbc658882f5f42856c5df3f41e14fde1c385 100644 (file)
@@ -54,8 +54,8 @@ Module :mod:`aifc` defines the following function:
    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:
index 19d71ccbf1d288a27917adf070e06f55407b4686..ccb9e45c1cb4e6ee2e22a10e87a4d31bb32bfec7 100644 (file)
@@ -494,6 +494,11 @@ aifc
 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
 --------