@@ -344,26 +344,28 @@ to locate the appropriate header file to simplify building this module.
344
344
345
345
--------------
346
346
347
- The :mod: `dbm.dumb ` module provides a persistent dictionary -like interface which
348
- is written entirely in Python. Unlike other modules such as :mod: ` dbm.gnu ` no
349
- external library is required. As with other persistent mappings, the keys and
350
- values are always stored as bytes .
351
-
352
- The module defines the following:
347
+ The :mod: `dbm.dumb ` module provides a persistent :class: ` dict ` -like interface which
348
+ is written entirely in Python.
349
+ Unlike other :mod: ` dbm ` backends, such as :mod: ` dbm.gnu ` no,
350
+ external library is required .
351
+ As with other persistent :term: ` mappings <mapping> `,
352
+ the keys and values are always stored as :class: ` bytes `.
353
353
354
+ The :mod: `!dbm.dumb ` module defines the following:
354
355
355
356
.. exception :: error
356
357
357
358
Raised on :mod: `dbm.dumb `-specific errors, such as I/O errors. :exc: `KeyError ` is
358
359
raised for general mapping errors like specifying an incorrect key.
359
360
360
361
361
- .. function :: open(filename[ , flag[ , mode]] )
362
+ .. function :: open(filename, flag="c" , mode=0o666 )
362
363
363
- Open a ``dumbdbm `` database and return a dumbdbm object. The *filename * argument is
364
- the basename of the database file (without any specific extensions). When a
365
- dumbdbm database is created, files with :file: `.dat ` and :file: `.dir ` extensions
366
- are created.
364
+ Open a "dumbdbm" database and return a :class: `!dumbdbm ` object.
365
+ The *filename * argument is the basename of the database file
366
+ (without any specific extensions).
367
+ When a "dumbdbm" database is created,
368
+ files with :file: `.dat ` and :file: `.dir ` extensions are created.
367
369
368
370
The optional *flag * argument can be:
369
371
@@ -385,7 +387,7 @@ The module defines the following:
385
387
Python's AST compiler.
386
388
387
389
.. versionchanged :: 3.5
388
- :func: `. open ` always creates a new database when the flag has the value
390
+ :func: `open ` always creates a new database when the flag has the value
389
391
``'n' ``.
390
392
391
393
.. versionchanged :: 3.8
@@ -397,7 +399,7 @@ The module defines the following:
397
399
Accepts :term: `path-like object ` for filename.
398
400
399
401
In addition to the methods provided by the
400
- :class: `collections.abc.MutableMapping ` class, :class: `dumbdbm ` objects
402
+ :class: `collections.abc.MutableMapping ` class, :class: `! dumbdbm ` objects
401
403
provide the following methods:
402
404
403
405
.. method :: dumbdbm.sync()
@@ -407,5 +409,5 @@ The module defines the following:
407
409
408
410
.. method :: dumbdbm.close()
409
411
410
- Close the `` dumbdbm `` database.
412
+ Close the " dumbdbm" database.
411
413
0 commit comments