Changed {\sc gdbm} to \code{gdbm} everywhere.

Fixed \indexsubitem to gdbm instead of dbm.

Changed dbm to \code{dbm} everywhere.
This commit is contained in:
Fred Drake 1997-12-04 04:45:28 +00:00
parent 36facb086e
commit c2297c1ce9
2 changed files with 24 additions and 26 deletions

View File

@ -2,29 +2,28 @@
\label{module-gdbm} \label{module-gdbm}
\bimodindex{gdbm} \bimodindex{gdbm}
This module is quite similar to the \code{dbm} module, but uses {\sc gdbm} This module is quite similar to the \code{dbm} module, but uses \code{gdbm}
instead to provide some additional functionality. Please note that instead to provide some additional functionality. Please note that
the file formats created by {\sc gdbm} and dbm are incompatible. the file formats created by \code{gdbm} and \code{dbm} are incompatible.
\bimodindex{dbm} \bimodindex{dbm}
The \code{gdbm} module provides an interface to the GNU DBM The \code{gdbm} module provides an interface to the GNU DBM
library. {\sc gdbm} objects behave like mappings library. \code{gdbm} objects behave like mappings
(dictionaries), except that keys and values are always strings. (dictionaries), except that keys and values are always strings.
Printing a {\sc gdbm} object doesn't print the keys and values, and the Printing a \code{gdbm} object doesn't print the keys and values, and the
\code{items()} and \code{values()} methods are not supported. \code{items()} and \code{values()} methods are not supported.
The module defines the following constant and functions: The module defines the following constant and functions:
\renewcommand{\indexsubitem}{(in module dbm)} \renewcommand{\indexsubitem}{(in module gdbm)}
\begin{excdesc}{error} \begin{excdesc}{error}
Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is Raised on \code{gdbm}-specific errors, such as I/O errors. \code{KeyError} is
raised for general mapping errors like specifying an incorrect key. raised for general mapping errors like specifying an incorrect key.
\end{excdesc} \end{excdesc}
\begin{funcdesc}{open}{filename\, \optional{flag\, \optional{mode}}} \begin{funcdesc}{open}{filename\, \optional{flag\, \optional{mode}}}
Open a dbm database and return a dbm object. The \var{filename} Open a \code{gdbm} database and return a \code{gdbm} object. The
argument is the name of the database file (without the \file{.dir} or \var{filename} argument is the name of the database file.
\file{.pag} extensions).
The optional \var{flag} argument can be The optional \var{flag} argument can be
\code{'r'} (to open an existing database for reading only --- default), \code{'r'} (to open an existing database for reading only --- default),
@ -44,12 +43,12 @@ only when the database has to be created. It defaults to octal
\code{0666}. \code{0666}.
\end{funcdesc} \end{funcdesc}
In addition to the dictionary-like methods, {\sc gdbm} objects have the In addition to the dictionary-like methods, \code{gdbm} objects have the
following methods: following methods:
\begin{funcdesc}{firstkey}{} \begin{funcdesc}{firstkey}{}
It's possible to loop over every key in the database using this method It's possible to loop over every key in the database using this method
and the \code{nextkey()} method. The traversal is ordered by {\sc gdbm}'s and the \code{nextkey()} method. The traversal is ordered by \code{gdbm}'s
internal hash values, and won't be sorted by the key values. This internal hash values, and won't be sorted by the key values. This
method returns the starting key. method returns the starting key.
\end{funcdesc} \end{funcdesc}
@ -68,8 +67,8 @@ while k!=None:
\begin{funcdesc}{reorganize}{} \begin{funcdesc}{reorganize}{}
If you have carried out a lot of deletions and would like to shrink If you have carried out a lot of deletions and would like to shrink
the space used by the {\sc gdbm} file, this routine will reorganize the the space used by the \code{gdbm} file, this routine will reorganize the
database. {\sc gdbm} will not shorten the length of a database file except database. \code{gdbm} will not shorten the length of a database file except
by using this reorganization; otherwise, deleted file space will be by using this reorganization; otherwise, deleted file space will be
kept and reused as new (key,value) pairs are added. kept and reused as new (key,value) pairs are added.
\end{funcdesc} \end{funcdesc}

View File

@ -2,29 +2,28 @@
\label{module-gdbm} \label{module-gdbm}
\bimodindex{gdbm} \bimodindex{gdbm}
This module is quite similar to the \code{dbm} module, but uses {\sc gdbm} This module is quite similar to the \code{dbm} module, but uses \code{gdbm}
instead to provide some additional functionality. Please note that instead to provide some additional functionality. Please note that
the file formats created by {\sc gdbm} and dbm are incompatible. the file formats created by \code{gdbm} and \code{dbm} are incompatible.
\bimodindex{dbm} \bimodindex{dbm}
The \code{gdbm} module provides an interface to the GNU DBM The \code{gdbm} module provides an interface to the GNU DBM
library. {\sc gdbm} objects behave like mappings library. \code{gdbm} objects behave like mappings
(dictionaries), except that keys and values are always strings. (dictionaries), except that keys and values are always strings.
Printing a {\sc gdbm} object doesn't print the keys and values, and the Printing a \code{gdbm} object doesn't print the keys and values, and the
\code{items()} and \code{values()} methods are not supported. \code{items()} and \code{values()} methods are not supported.
The module defines the following constant and functions: The module defines the following constant and functions:
\renewcommand{\indexsubitem}{(in module dbm)} \renewcommand{\indexsubitem}{(in module gdbm)}
\begin{excdesc}{error} \begin{excdesc}{error}
Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is Raised on \code{gdbm}-specific errors, such as I/O errors. \code{KeyError} is
raised for general mapping errors like specifying an incorrect key. raised for general mapping errors like specifying an incorrect key.
\end{excdesc} \end{excdesc}
\begin{funcdesc}{open}{filename\, \optional{flag\, \optional{mode}}} \begin{funcdesc}{open}{filename\, \optional{flag\, \optional{mode}}}
Open a dbm database and return a dbm object. The \var{filename} Open a \code{gdbm} database and return a \code{gdbm} object. The
argument is the name of the database file (without the \file{.dir} or \var{filename} argument is the name of the database file.
\file{.pag} extensions).
The optional \var{flag} argument can be The optional \var{flag} argument can be
\code{'r'} (to open an existing database for reading only --- default), \code{'r'} (to open an existing database for reading only --- default),
@ -44,12 +43,12 @@ only when the database has to be created. It defaults to octal
\code{0666}. \code{0666}.
\end{funcdesc} \end{funcdesc}
In addition to the dictionary-like methods, {\sc gdbm} objects have the In addition to the dictionary-like methods, \code{gdbm} objects have the
following methods: following methods:
\begin{funcdesc}{firstkey}{} \begin{funcdesc}{firstkey}{}
It's possible to loop over every key in the database using this method It's possible to loop over every key in the database using this method
and the \code{nextkey()} method. The traversal is ordered by {\sc gdbm}'s and the \code{nextkey()} method. The traversal is ordered by \code{gdbm}'s
internal hash values, and won't be sorted by the key values. This internal hash values, and won't be sorted by the key values. This
method returns the starting key. method returns the starting key.
\end{funcdesc} \end{funcdesc}
@ -68,8 +67,8 @@ while k!=None:
\begin{funcdesc}{reorganize}{} \begin{funcdesc}{reorganize}{}
If you have carried out a lot of deletions and would like to shrink If you have carried out a lot of deletions and would like to shrink
the space used by the {\sc gdbm} file, this routine will reorganize the the space used by the \code{gdbm} file, this routine will reorganize the
database. {\sc gdbm} will not shorten the length of a database file except database. \code{gdbm} will not shorten the length of a database file except
by using this reorganization; otherwise, deleted file space will be by using this reorganization; otherwise, deleted file space will be
kept and reused as new (key,value) pairs are added. kept and reused as new (key,value) pairs are added.
\end{funcdesc} \end{funcdesc}