summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2014-06-25 13:06:32 +0200
committerJesus Cea <jcea@jcea.es>2014-06-25 13:06:32 +0200
commit9f65a35b7ea7f5dca7e922f203992cd0a6661de9 (patch)
treef863374e4bbb25120854618025fa5c0ec2cc91aa /Doc
parentfc0cad86c71f91b1485524d9f80650a30097f641 (diff)
parent0c4baa40ec73044b79d330e04b413ca04f3baedf (diff)
downloadcpython-git-9f65a35b7ea7f5dca7e922f203992cd0a6661de9.tar.gz
MERGE: Closes #20872: dbm/gdbm/ndbm close methods are not documented
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/dbm.rst18
1 files changed, 16 insertions, 2 deletions
diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst
index b0133d8405..3f3c43d438 100644
--- a/Doc/library/dbm.rst
+++ b/Doc/library/dbm.rst
@@ -222,6 +222,9 @@ supported.
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 @@ to locate the appropriate header file to simplify building this module.
.. 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 @@ to locate the appropriate header file to simplify building this module.
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
@@ -330,9 +339,14 @@ The module defines the following:
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.
+