(original) (raw)
changeset: 89511:200207e50cbf user: R David Murray rdmurray@bitdance.com date: Sat Mar 08 12:00:52 2014 -0500 files: Doc/whatsnew/3.4.rst description: whatsnew: dbm.open is context manager. (#19282) diff -r b72615222c98 -r 200207e50cbf Doc/whatsnew/3.4.rst --- a/Doc/whatsnew/3.4.rst Sat Mar 08 11:46:05 2014 -0500 +++ b/Doc/whatsnew/3.4.rst Sat Mar 08 12:00:52 2014 -0500 @@ -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 --- /rdmurray@bitdance.com