summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libshelve.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libshelve.tex')
-rw-r--r--Doc/lib/libshelve.tex29
1 files changed, 16 insertions, 13 deletions
diff --git a/Doc/lib/libshelve.tex b/Doc/lib/libshelve.tex
index 6318723..996c79b 100644
--- a/Doc/lib/libshelve.tex
+++ b/Doc/lib/libshelve.tex
@@ -14,12 +14,14 @@ sub-objects. The keys are ordinary strings.
\refstmodindex{pickle}
\begin{funcdesc}{open}{filename\optional{,flag='c'\optional{,binary=\code{False}}}}
-Open a persistent dictionary. By default, the underlying database file is
-opened for reading and writing. The optional \var{flag} pararameter, if set
-to \code{'r'}, can be used to force the file to be opened in read-only mode.
-By default, ASCII pickles are used to serialize values. If the optional
-{}\var{binary} parameter is set to \var{True}, binary pickles will be used
-instead.
+Open a persistent dictionary. The filename specified is the base filename
+for the underlying database. As a side-effect, an extension may be added to
+the filename and more than one file may be created. By default, the
+underlying database file is opened for reading and writing. The optional
+{}\var{flag} pararameter has the same interpretation as the \var{flag}
+parameter of \function{anydbm.open}. By default, ASCII pickles are used to
+serialize values. If the optional \var{binary} parameter is set to
+{}\var{True}, binary pickles will be used instead.
\end{funcdesc}
Shelve objects support all methods supported by dictionaries. This eases
@@ -78,13 +80,14 @@ class.
\end{classdesc}
\begin{classdesc}{DbfilenameShelf}{filename\optional{, flag='c'\optional{, binary=False}}}
-A subclass of \class{Shelf} which accepts a \var{filename} instead of a dict-like
-object. The underlying file will be opened using \function{anydbm.open}.
-By default, the file will be created and opened for both read and write.
-The optional \var{flag} parameter has the same interpretation as for the
-\function{open} function.
-The optional \var{binary} parameter has the same interpretation as for the
-\class{Shelf} class.
+
+A subclass of \class{Shelf} which accepts a \var{filename} instead of a
+dict-like object. The underlying file will be opened using
+{}\function{anydbm.open}. By default, the file will be created and opened
+for both read and write. The optional \var{flag} parameter has the same
+interpretation as for the \function{open} function. The optional
+\var{binary} parameter has the same interpretation as for the
+{}\class{Shelf} class.
\end{classdesc}
\subsection{Example}