diff options
author | Jesus Cea <jcea@jcea.es> | 2014-06-25 11:05:31 (GMT) |
---|---|---|
committer | Jesus Cea <jcea@jcea.es> | 2014-06-25 11:05:31 (GMT) |
commit | ac4b7f705a9194d9f5392f7aa7e4f66ac3e36f8b (patch) | |
tree | c68d8e3ac190cfaae47be786a68379fb5b557878 /Doc/library/dbm.rst | |
parent | e8ef8b7a2095fdca3c16c1166b9c071dede55e22 (diff) | |
download | cpython-ac4b7f705a9194d9f5392f7aa7e4f66ac3e36f8b.zip cpython-ac4b7f705a9194d9f5392f7aa7e4f66ac3e36f8b.tar.gz cpython-ac4b7f705a9194d9f5392f7aa7e4f66ac3e36f8b.tar.bz2 |
Closes #20872: dbm/gdbm/ndbm close methods are not documented
Diffstat (limited to 'Doc/library/dbm.rst')
-rw-r--r-- | Doc/library/dbm.rst | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst index 81a05c7..bd88f41 100644 --- a/Doc/library/dbm.rst +++ b/Doc/library/dbm.rst @@ -216,6 +216,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 ------------------------------------------- @@ -247,7 +250,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: @@ -272,6 +275,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 @@ -319,9 +328,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. + |