diff options
author | Guido van Rossum <guido@python.org> | 1994-01-02 01:22:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-01-02 01:22:07 (GMT) |
commit | 5fdeeeae2a12b9956cc84d62eae82f72cabc8664 (patch) | |
tree | ac0053479e10099850c8e0d06e31cb3afbf632bb /Doc/lib/libdbm.tex | |
parent | 0b0719866e8a32d0a787e73bca9e79df1d1a74f8 (diff) | |
download | cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.zip cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.tar.gz cpython-5fdeeeae2a12b9956cc84d62eae82f72cabc8664.tar.bz2 |
Restructured library documentation
Diffstat (limited to 'Doc/lib/libdbm.tex')
-rw-r--r-- | Doc/lib/libdbm.tex | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Doc/lib/libdbm.tex b/Doc/lib/libdbm.tex new file mode 100644 index 0000000..7ff4ee5 --- /dev/null +++ b/Doc/lib/libdbm.tex @@ -0,0 +1,24 @@ +\section{Built-in Module \sectcode{dbm}} +\bimodindex{dbm} + +Dbm provides python programs with an interface to the unix \code{ndbm} +database library. Dbm objects are of the mapping type, so they can be +handled just like objects of the built-in \dfn{dictionary} type, +except that keys and values are always strings, and printing a dbm +object doesn't print the keys and values. + +The module defines the following constant and functions: + +\renewcommand{\indexsubitem}{(in module dbm)} +\begin{excdesc}{error} +Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is +raised for general mapping errors like specifying an incorrect key. +\end{excdesc} + +\begin{funcdesc}{open}{filename\, rwmode\, filemode} +Open a dbm database and return a mapping object. \var{filename} is +the name of the database file (without the \file{.dir} or \file{.pag} +extensions), \var{rwmode} is \code{'r'}, \code{'w'} or \code{'rw'} as for +\code{open}, and \var{filemode} is the unix mode of the file, used only +when the database has to be created. +\end{funcdesc} |