mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
MERGE: Closes #20872: dbm/gdbm/ndbm close methods are not documented
This commit is contained in:
commit
0c4baa40ec
1 changed files with 16 additions and 2 deletions
|
|
@ -222,6 +222,9 @@ supported.
|
||||||
When the database has been opened in fast mode, this method forces any
|
When the database has been opened in fast mode, this method forces any
|
||||||
unwritten data to be written to the disk.
|
unwritten data to be written to the disk.
|
||||||
|
|
||||||
|
.. method:: gdbm.close()
|
||||||
|
|
||||||
|
Close the ``gdbm`` database.
|
||||||
|
|
||||||
:mod:`dbm.ndbm` --- Interface based on ndbm
|
: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]])
|
.. 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).
|
name of the database file (without the :file:`.dir` or :file:`.pag` extensions).
|
||||||
|
|
||||||
The optional *flag* argument must be one of these values:
|
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
|
database has to be created. It defaults to octal ``0o666`` (and will be
|
||||||
modified by the prevailing umask).
|
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
|
:mod:`dbm.dumb` --- Portable DBM implementation
|
||||||
|
|
@ -325,9 +334,14 @@ The module defines the following:
|
||||||
|
|
||||||
In addition to the methods provided by the
|
In addition to the methods provided by the
|
||||||
:class:`collections.abc.MutableMapping` class, :class:`dumbdbm` objects
|
:class:`collections.abc.MutableMapping` class, :class:`dumbdbm` objects
|
||||||
provide the following method:
|
provide the following methods:
|
||||||
|
|
||||||
.. method:: dumbdbm.sync()
|
.. method:: dumbdbm.sync()
|
||||||
|
|
||||||
Synchronize the on-disk directory and data files. This method is called
|
Synchronize the on-disk directory and data files. This method is called
|
||||||
by the :meth:`Shelve.sync` method.
|
by the :meth:`Shelve.sync` method.
|
||||||
|
|
||||||
|
.. method:: dumbdbm.close()
|
||||||
|
|
||||||
|
Close the ``dumbdbm`` database.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue