From 9bd6a37df278a1570d347f84c9b58230f36bdbaf Mon Sep 17 00:00:00 2001 From: R David Murray Date: Sat, 8 Mar 2014 12:00:52 -0500 Subject: [PATCH] whatsnew: dbm.open is context manager. (#19282) --- Doc/whatsnew/3.4.rst | 9 +++++++++ 1 file changed, 9 insertions(+) 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 --- -- 2.40.0