diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-06-10 18:16:00 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-06-10 18:16:00 (GMT) |
commit | b398d33c65636aed68246179a4f6ae4b3fbcf182 (patch) | |
tree | fb373ad7783e72cc5a0454e0907afc4de370129f /Doc/library | |
parent | 4c4cde7829211bd565e4a045d4d9bda39cf9dab7 (diff) | |
download | cpython-b398d33c65636aed68246179a4f6ae4b3fbcf182.zip cpython-b398d33c65636aed68246179a4f6ae4b3fbcf182.tar.gz cpython-b398d33c65636aed68246179a4f6ae4b3fbcf182.tar.bz2 |
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')
-rw-r--r-- | Doc/library/dbm.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/library/dbm.rst b/Doc/library/dbm.rst index f5496d5..b0133d8 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: |