[Python-checkins] cpython (merge 3.3 -> 3.4): MERGE: Closes #20872: dbm/gdbm/ndbm close methods are not documented
jesus.cea
python-checkins at python.org
Wed Jun 25 13:06:54 CEST 2014
http://hg.python.org/cpython/rev/88fb216b99fb
changeset: 91399:88fb216b99fb
branch: 3.4
parent: 91395:16d8240ff841
parent: 91398:cf156cfb12e7
user: Jesus Cea <jcea at jcea.es>
date: Wed Jun 25 13:06:07 2014 +0200
summary:
MERGE: Closes #20872: dbm/gdbm/ndbm close methods are not documented
files:
Doc/library/dbm.rst | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst
--- a/Doc/library/dbm.rst
+++ b/Doc/library/dbm.rst
@@ -222,6 +222,9 @@
When the database has been opened in fast mode, this method forces any
unwritten data to be written to the disk.
+ .. method:: gdbm.close()
+
+ Close the ``gdbm`` database.
:mod:`dbm.ndbm` --- Interface based on ndbm
-------------------------------------------
@@ -253,7 +256,7 @@
.. function:: open(filename[, flag[, mode]])
- Open a dbm database and return a ``dbm`` object. The *filename* argument is the
+ Open a dbm database and return a ``ndbm`` object. The *filename* argument is the
name of the database file (without the :file:`.dir` or :file:`.pag` extensions).
The optional *flag* argument must be one of these values:
@@ -278,6 +281,12 @@
database has to be created. It defaults to octal ``0o666`` (and will be
modified by the prevailing umask).
+ In addition to the dictionary-like methods, ``ndbm`` objects
+ provide the following method:
+
+ .. method:: ndbm.close()
+
+ Close the ``ndbm`` database.
:mod:`dbm.dumb` --- Portable DBM implementation
@@ -325,9 +334,14 @@
In addition to the methods provided by the
:class:`collections.abc.MutableMapping` class, :class:`dumbdbm` objects
- provide the following method:
+ provide the following methods:
.. method:: dumbdbm.sync()
Synchronize the on-disk directory and data files. This method is called
by the :meth:`Shelve.sync` method.
+
+ .. method:: dumbdbm.close()
+
+ Close the ``dumbdbm`` database.
+
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list