mirror of https://github.com/python/cpython.git
more tweaks
This commit is contained in:
parent
190613cee9
commit
1f7a271f0b
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue