[Python-checkins] CVS: python/dist/src/Doc/lib libdbm.tex,1.17,1.18
Fred L. Drake
python-dev@python.org
Fri, 15 Sep 2000 14:31:34 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv13984/lib
Modified Files:
libdbm.tex
Log Message:
Add some comments on the available implementations that this module can
use.
Change the list of flag values for open() to a table.
Markup consistency nits.
Index: libdbm.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libdbm.tex,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** libdbm.tex 1999/04/05 22:18:11 1.17
--- libdbm.tex 2000/09/15 21:31:31 1.18
***************
*** 8,20 ****
The \module{dbm} module provides an interface to the \UNIX{}
! \code{(n)dbm} library. Dbm objects behave like mappings
(dictionaries), except that keys and values are always strings.
Printing a dbm object doesn't print the keys and values, and the
\method{items()} and \method{values()} methods are not supported.
! See also the \refmodule{gdbm}\refbimodindex{gdbm} module, which
! provides a similar interface using the GNU GDBM library.
! The module defines the following constant and functions:
\begin{excdesc}{error}
--- 8,22 ----
The \module{dbm} module provides an interface to the \UNIX{}
! (\code{n})\code{dbm} library. Dbm objects behave like mappings
(dictionaries), except that keys and values are always strings.
Printing a dbm object doesn't print the keys and values, and the
\method{items()} and \method{values()} methods are not supported.
! This module can be used with the ``classic'' ndbm interface, the BSD
! DB compatibility interface, or the GNU GDBM compatibility interface.
! On \UNIX, the \program{configure} script will attempt to locate the
! appropriate header file to simplify building this module.
! The module defines the following:
\begin{excdesc}{error}
***************
*** 24,37 ****
\end{excdesc}
! \begin{funcdesc}{open}{filename, \optional{flag, \optional{mode}}}
Open a dbm database and return a dbm object. The \var{filename}
argument is the name of the database file (without the \file{.dir} or
! \file{.pag} extensions).
!
! The optional \var{flag} argument can be
! \code{'r'} (to open an existing database for reading only --- default),
! \code{'w'} (to open an existing database for reading and writing),
! \code{'c'} (which creates the database if it doesn't exist), or
! \code{'n'} (which always creates a new empty database).
The optional \var{mode} argument is the \UNIX{} mode of the file, used
--- 26,50 ----
\end{excdesc}
! \begin{datadesc}{library}
! Name of the \code{ndbm} implementation library used.
! \end{datadesc}
!
! \begin{funcdesc}{open}{filename\optional{, flag\optional{, mode}}}
Open a dbm database and return a dbm object. The \var{filename}
argument is the name of the database file (without the \file{.dir} or
! \file{.pag} extensions; note that the BSD DB implementation of the
! interface will append the extension \file{.db} and only create one
! file).
!
! The optional \var{flag} argument must be one of these values:
!
! \begin{tableii}{c|l}{code}{Value}{Meaning}
! \lineii{'r'}{Open existing database for reading only (default)}
! \lineii{'w'}{Open existing database for reading and writing}
! \lineii{'c'}{Open database for reading and writing, creating it if
! it doesn't exist}
! \lineii{'n'}{Always create a new, empty database, open for reading
! and writing}
! \end{tableii}
The optional \var{mode} argument is the \UNIX{} mode of the file, used
***************
*** 43,46 ****
--- 56,60 ----
\begin{seealso}
\seemodule{anydbm}{Generic interface to \code{dbm}-style databases.}
+ \seemodule{gdbm}{Similar interface to the GNU GDBM library.}
\seemodule{whichdb}{Utility module used to determine the type of an
existing database.}