]> granicus.if.org Git - python/commitdiff
Added a few items to the "See also" sections at Guido's prompting. Made
authorFred Drake <fdrake@acm.org>
Mon, 5 Apr 1999 19:46:21 +0000 (19:46 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 5 Apr 1999 19:46:21 +0000 (19:46 +0000)
more references to other modules in the text hyperlinks for the HTML and
PDF versions.

Doc/lib/libanydbm.tex
Doc/lib/libshelve.tex

index 5e919415471485308bad43cd32effce1e800cca5..6087378af5b97fb2735513092f6a4a2c6da04e64 100644 (file)
@@ -7,17 +7,17 @@
 
 \module{anydbm} is a generic interface to variants of the DBM
 database --- \module{dbhash}\refbimodindex{dbhash},
-\module{gdbm}\refbimodindex{gdbm}, or \module{dbm}\refbimodindex{dbm}.
-If none of these modules is installed, the slow-but-simple
-implementation in module \module{dumbdbm}\refstmodindex{dumbdbm} will
-be used.
+\refmodule{gdbm}\refbimodindex{gdbm}, or
+\refmodule{dbm}\refbimodindex{dbm}.  If none of these modules is
+installed, the slow-but-simple implementation in module
+\refmodule{dumbdbm}\refstmodindex{dumbdbm} will be used.
 
 \begin{funcdesc}{open}{filename\optional{, flag\optional{, mode}}}
 Open the database file \var{filename} and return a corresponding object.
 
-If the database file already exists, the \module{whichdb} module is
+If the database file already exists, the \refmodule{whichdb} module is 
 used to determine its type and the appropriate module is used; if it
-doesn't exist, the first module listed above that can be imported is
+does not exist, the first module listed above that can be imported is
 used.
 
 The optional \var{flag} argument can be
@@ -46,6 +46,18 @@ be stored, retrieved, and deleted, and the \method{has_key()} and
 strings.
 
 
+\begin{seealso}
+  \seemodule{anydbm}{Generic interface to \code{dbm}-style databases.}
+  % Should include entry for dbhash, but that isn't documented.
+  \seemodule{dbm}{Standard \UNIX{} database interface.}
+  \seemodule{dumbdbm}{Portable implementation of the \code{dbm} interface.}
+  \seemodule{gdbm}{GNU database interface, based on the \code{dbm} interface.}
+  \seemodule{shelve}{General object persistence built on top of 
+                     the Python \code{dbm} interface.}
+  \seemodule{whichdb}{Utility module used to determine the type of an
+                      existing database.}
+\end{seealso}
+
 
 \section{\module{dumbdbm} ---
          Portable DBM implementation}
index 7a463cd0094dfbe62a1e4af58cfc187e2de5fad6..6b96872ad0dc3fa71f3931da2c4fa3c9530f9d16 100644 (file)
@@ -1,5 +1,5 @@
 \section{\module{shelve} ---
-         Python object persistency.}
+         Python object persistency}
 \declaremodule{standard}{shelve}
 
 \modulesynopsis{Python object persistency.}
@@ -8,8 +8,8 @@
 A ``shelf'' is a persistent, dictionary-like object.  The difference
 with ``dbm'' databases is that the values (not the keys!) in a shelf
 can be essentially arbitrary Python objects --- anything that the
-\code{pickle} module can handle.  This includes most class instances,
-recursive data types, and objects containing lots of shared
+\refmodule{pickle} module can handle.  This includes most class
+instances, recursive data types, and objects containing lots of shared 
 sub-objects.  The keys are ordinary strings.
 \refstmodindex{pickle}
 
@@ -32,20 +32,20 @@ list = d.keys() # a list of all existing keys (slow!)
 
 d.close()       # close it
 \end{verbatim}
-%
+
 Restrictions:
 
 \begin{itemize}
 
 \item
-The choice of which database package will be used (e.g. \code{dbm} or
-\code{gdbm})
-depends on which interface is available.  Therefore it isn't safe to
-open the database directly using \code{dbm}.  The database is also
-(unfortunately) subject to the limitations of \code{dbm}, if it is used ---
-this means that (the pickled representation of) the objects stored in
-the database should be fairly small, and in rare cases key collisions
-may cause the database to refuse updates.
+The choice of which database package will be used
+(e.g. \refmodule{dbm} or \refmodule{gdbm}) depends on which interface
+is available.  Therefore it is not safe to open the database directly
+using \refmodule{dbm}.  The database is also (unfortunately) subject
+to the limitations of \refmodule{dbm}, if it is used --- this means
+that (the pickled representation of) the objects stored in the
+database should be fairly small, and in rare cases key collisions may
+cause the database to refuse updates.
 \refbimodindex{dbm}
 \refbimodindex{gdbm}
 
@@ -54,7 +54,7 @@ Dependent on the implementation, closing a persistent dictionary may
 or may not be necessary to flush changes to disk.
 
 \item
-The \code{shelve} module does not support \emph{concurrent} read/write
+The \module{shelve} module does not support \emph{concurrent} read/write
 access to shelved objects.  (Multiple simultaneous read accesses are
 safe.)  When a program has a shelf open for writing, no other program
 should have it open for reading or writing.  \UNIX{} file locking can
@@ -65,6 +65,11 @@ requires knowledge about the database implementation used.
 
 
 \begin{seealso}
+  \seemodule{anydbm}{Generic interface to \code{dbm}-style databases.}
+  % Should include entry for dbhash, but that isn't documented.
+  \seemodule{dbm}{Standard \UNIX{} database interface.}
+  \seemodule{dumbdbm}{Portable implementation of the \code{dbm} interface.}
+  \seemodule{gdbm}{GNU database interface, based on the \code{dbm} interface.}
   \seemodule{pickle}{Object serialization used by \module{shelve}.}
   \seemodule{cPickle}{High-performance version of \module{pickle}.}
 \end{seealso}