whatsnew: dbm.open is context manager. (#19282)

This commit is contained in:
R David Murray 2014-03-08 12:00:52 -05:00
parent cbf479ae64
commit 9bd6a37df2
1 changed files with 9 additions and 0 deletions

View File

@ -617,6 +617,15 @@ The :mod:`contextlib` documentation has also been updated to include a
differences between single use, reusable and reentrant context managers. 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 dis
--- ---