From: R David Murray <rdmurray@bitdance.com> Date: Sat, 8 Mar 2014 17:00:52 +0000 (-0500) Subject: whatsnew: dbm.open is context manager. (#19282) X-Git-Tag: v3.4.1rc1~233^2~116 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9bd6a37df278a1570d347f84c9b58230f36bdbaf;p=python whatsnew: dbm.open is context manager. (#19282) --- diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index 3e803a3d9a..a73af1e4f4 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -617,6 +617,15 @@ The :mod:`contextlib` documentation has also been updated to include a differences between single use, reusable and reentrant context managers. +dbm +--- + +:func:`dbm.open` objects now support the context management protocol. When +used in a :keyword:`with` statement, the ``close`` method of the database +object will be called automatically at the end of the block. (Contributed by +Claudiu Popa and Nick Coghlan in :issue:`19282`.) + + dis ---