summaryrefslogtreecommitdiff
path: root/Doc/library/dbm.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-06-10 21:16:00 +0300
committerSerhiy Storchaka <storchaka@gmail.com>2014-06-10 21:16:00 +0300
commit6bf3686912b62cb0a11e3b06ecff1a9183cd8131 (patch)
treeccd23a7af14a9738704d5ba0704b402828c090a1 /Doc/library/dbm.rst
parent08319b3e8f4ca003888e038814d3796d7678b732 (diff)
downloadcpython-6bf3686912b62cb0a11e3b06ecff1a9183cd8131.tar.gz
Issue #18039: dbm.dump.open() now always creates a new database when the
flag has the value 'n'. Patch by Claudiu Popa.
Diffstat (limited to 'Doc/library/dbm.rst')
-rw-r--r--Doc/library/dbm.rst9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst
index f5496d5b99..b0133d8405 100644
--- a/Doc/library/dbm.rst
+++ b/Doc/library/dbm.rst
@@ -316,13 +316,18 @@ The module defines the following:
dumbdbm database is created, files with :file:`.dat` and :file:`.dir` extensions
are created.
- The optional *flag* argument is currently ignored; the database is always opened
- for update, and will be created if it does not exist.
+ The optional *flag* argument supports only the semantics of ``'c'``
+ and ``'n'`` values. Other values will default to database being always
+ opened for update, and will be created if it does not exist.
The optional *mode* argument is the Unix mode of the file, used only when the
database has to be created. It defaults to octal ``0o666`` (and will be modified
by the prevailing umask).
+ .. versionchanged:: 3.5
+ :func:`.open` always creates a new database when the flag has the value
+ ``'n'``.
+
In addition to the methods provided by the
:class:`collections.abc.MutableMapping` class, :class:`dumbdbm` objects
provide the following method: