Kaydet (Commit) 1f7a271f authored tarafından Skip Montanaro's avatar Skip Montanaro

more tweaks

üst 190613ce
...@@ -14,12 +14,14 @@ sub-objects. The keys are ordinary strings. ...@@ -14,12 +14,14 @@ sub-objects. The keys are ordinary strings.
\refstmodindex{pickle} \refstmodindex{pickle}
\begin{funcdesc}{open}{filename\optional{,flag='c'\optional{,binary=\code{False}}}} \begin{funcdesc}{open}{filename\optional{,flag='c'\optional{,binary=\code{False}}}}
Open a persistent dictionary. By default, the underlying database file is Open a persistent dictionary. The filename specified is the base filename
opened for reading and writing. The optional \var{flag} pararameter, if set for the underlying database. As a side-effect, an extension may be added to
to \code{'r'}, can be used to force the file to be opened in read-only mode. the filename and more than one file may be created. By default, the
By default, ASCII pickles are used to serialize values. If the optional underlying database file is opened for reading and writing. The optional
{}\var{binary} parameter is set to \var{True}, binary pickles will be used {}\var{flag} pararameter has the same interpretation as the \var{flag}
instead. 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} \end{funcdesc}
Shelve objects support all methods supported by dictionaries. This eases Shelve objects support all methods supported by dictionaries. This eases
...@@ -78,13 +80,14 @@ class. ...@@ -78,13 +80,14 @@ class.
\end{classdesc} \end{classdesc}
\begin{classdesc}{DbfilenameShelf}{filename\optional{, flag='c'\optional{, binary=False}}} \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}. A subclass of \class{Shelf} which accepts a \var{filename} instead of a
By default, the file will be created and opened for both read and write. dict-like object. The underlying file will be opened using
The optional \var{flag} parameter has the same interpretation as for the {}\function{anydbm.open}. By default, the file will be created and opened
\function{open} function. for both read and write. The optional \var{flag} parameter has the same
The optional \var{binary} parameter has the same interpretation as for the interpretation as for the \function{open} function. The optional
\class{Shelf} class. \var{binary} parameter has the same interpretation as for the
{}\class{Shelf} class.
\end{classdesc} \end{classdesc}
\subsection{Example} \subsection{Example}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment