Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
27bd2c36
Commit
27bd2c36
authored
Jul 21, 2003
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge the old dumbdbm documetation into the new docs that have been added.
Make some module references hyperlinks.
parent
7eade5ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
59 deletions
+28
-59
Doc/lib/libanydbm.tex
Doc/lib/libanydbm.tex
+0
-37
Doc/lib/libdumbdbm.tex
Doc/lib/libdumbdbm.tex
+28
-22
No files found.
Doc/lib/libanydbm.tex
View file @
27bd2c36
...
...
@@ -57,40 +57,3 @@ strings.
\seemodule
{
whichdb
}{
Utility module used to determine the type of an
existing database.
}
\end{seealso}
\section
{
\module
{
dumbdbm
}
---
Portable DBM implementation
}
\declaremodule
{
standard
}{
dumbdbm
}
\modulesynopsis
{
Portable implementation of the simple DBM interface.
}
A simple and slow database implemented entirely in Python. This
should only be used when no other DBM-style database is available.
\begin{funcdesc}
{
open
}{
filename
\optional
{
, flag
\optional
{
, mode
}}}
Open the database file
\var
{
filename
}
and return a corresponding
object. The
\var
{
flag
}
argument, used to control how the database is
opened in the other DBM implementations, is ignored in
\module
{
dumbdbm
}
; the database is always opened for update, and will
be created if it does not exist.
The optional
\var
{
mode
}
argument is the
\UNIX
{}
mode of the file, used
only when the database has to be created. It defaults to octal
\code
{
0666
}
(and will be modified by the prevailing umask).
\versionchanged
[The
\var
{
mode
}
argument was ignored in earlier
versions]
{
2.2
}
\end{funcdesc}
\begin{excdesc}
{
error
}
Raised for errors not reported as
\exception
{
KeyError
}
errors.
\end{excdesc}
\begin{seealso}
\seemodule
{
anydbm
}{
Generic interface to
\code
{
dbm
}
-style databases.
}
\seemodule
{
whichdb
}{
Utility module used to determine the type of an
existing database.
}
\end{seealso}
Doc/lib/libdumbdbm.tex
View file @
27bd2c36
\section
{
\module
{
dumbdbm
}
---
Simple ``database'' interface written in Pyth
on
}
Portable DBM implementati
on
}
\declaremodule
{
builtin
}{
dumbdbm
}
\modulesynopsis
{
A dbm-style module available on all platforms
.
}
\declaremodule
{
standard
}{
dumbdbm
}
\modulesynopsis
{
Portable implementation of the simple DBM interface
.
}
\index
{
databases
}
\note
{
The
\module
{
dumbdbm
}
module is intended as a last resort fallback for
the
\module
{
anydbm
}
module when no other more robust module is available.
\begin{notice}
The
\module
{
dumbdbm
}
module is intended as a last resort fallback for
the
\refmodule
{
anydbm
}
module when no more robust module is available.
The
\module
{
dumbdbm
}
module is not written for speed and is not nearly as
heavily used as the other database modules.
}
heavily used as the other database modules.
\end{notice}
The
\module
{
dumbdbm
}
module provides a persisten dictionary-like interface
The
\module
{
dumbdbm
}
module provides a persisten
t
dictionary-like interface
which is written entirely in Python. Unlike other modules such as
{}
\module
{
gdbm
}
and
\
module
{
bsddb
}
, no external library is required. As
\refmodule
{
gdbm
}
and
\ref
module
{
bsddb
}
, no external library is required. As
with other persistent mappings, the keys and values must always be strings.
The module defines the following:
...
...
@@ -24,28 +26,21 @@ is raised for general mapping errors like specifying an incorrect key.
\end{excdesc}
\begin{funcdesc}
{
open
}{
filename
\optional
{
, flag
\optional
{
, mode
}}}
Open a dumbdbm database and return a dumbdbm object. The
\var
{
filename
}
argument is the basename of the database file (without any specific
extensions). When a dumbdbm database is created, files with
\
cod
e
{
.dat
}
and
\
cod
e
{
.dir
}
extensions are created.
extensions). When a dumbdbm database is created, files with
\
fil
e
{
.dat
}
and
\
fil
e
{
.dir
}
extensions are created.
The optional
\var
{
flag
}
argument is currently ignored.
The optional
\var
{
flag
}
argument is currently ignored; the database is
always opened for update, and will be created if it does not exist.
The optional
\var
{
mode
}
argument is the
\UNIX
{}
mode of the file, used
only when the database has to be created. It defaults to octal
\code
{
0666
}
.
\code
{
0666
}
(and will be modified by the prevailing umask).
\versionchanged
[The
\var
{
mode
}
argument was ignored in earlier
versions]
{
2.2
}
\end{funcdesc}
\subsection
{
Dumbdbm Objects
\label
{
dumbdbm-objects
}}
In addition to the methods provided by the
\class
{
UserDict.DictMixin
}
class,
\class
{
dumbdbm
}
objects provide the following methods.
\begin{methoddesc}
{
sync
}{}
Synchronize the on-disk directory and data files. This method is called by
the
\method
{
sync
}
method of
\class
{
Shelve
}
objects.
\end{methoddesc}
\begin{seealso}
\seemodule
{
anydbm
}{
Generic interface to
\code
{
dbm
}
-style databases.
}
...
...
@@ -55,3 +50,14 @@ the \method{sync} method of \class{Shelve} objects.
\seemodule
{
whichdb
}{
Utility module used to determine the type of an
existing database.
}
\end{seealso}
\subsection
{
Dumbdbm Objects
\label
{
dumbdbm-objects
}}
In addition to the methods provided by the
\class
{
UserDict.DictMixin
}
class,
\class
{
dumbdbm
}
objects provide the following methods.
\begin{methoddesc}
{
sync
}{}
Synchronize the on-disk directory and data files. This method is called by
the
\method
{
sync
}
method of
\class
{
Shelve
}
objects.
\end{methoddesc}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment