[Python-checkins] cpython: whatsnew: dbm.open is context manager. (#19282)

r.david.murray python-checkins at python.org
Sat Mar 8 18:54:22 CET 2014


http://hg.python.org/cpython/rev/200207e50cbf
changeset: 89511:200207e50cbf
user: R David Murray <rdmurray at bitdance.com>
date: Sat Mar 08 12:00:52 2014 -0500
summary:
 whatsnew: dbm.open is context manager. (#19282)
files:
 Doc/whatsnew/3.4.rst | 9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
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
@@ -617,6 +617,15 @@
 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
 ---
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /