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
0bf84751
Commit
0bf84751
authored
Jul 07, 1995
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
documented default flag, mode; changed gdbm into a pointer to dbm
parent
f10570b9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
78 deletions
+54
-78
Doc/lib/libdbm.tex
Doc/lib/libdbm.tex
+23
-12
Doc/lib/libgdbm.tex
Doc/lib/libgdbm.tex
+4
-27
Doc/libdbm.tex
Doc/libdbm.tex
+23
-12
Doc/libgdbm.tex
Doc/libgdbm.tex
+4
-27
No files found.
Doc/lib/libdbm.tex
View file @
0bf84751
\section
{
Built-in Module
\sectcode
{
dbm
}}
\section
{
Built-in Module
\sectcode
{
dbm
}}
\bimodindex
{
dbm
}
\bimodindex
{
dbm
}
Dbm provides python programs with an interface to the unix
\code
{
ndbm
}
The
\code
{
dbm
}
module provides an interface to the
{
\UNIX
}
database library. Dbm objects are of the mapping type, so they can be
\code
{
(n)dbm
}
library. Dbm objects behave like mappings
handled just like objects of the built-in
\dfn
{
dictionary
}
type,
(dictionaries), except that keys and values are always strings.
except that keys and values are always strings, and printing a dbm
Printing a dbm object doesn't print the keys and values, and the
object doesn't print the keys and values.
\code
{
items()
}
and
\code
{
values()
}
methods are not supported.
See also the
\code
{
gdbm
}
module, which provides a similar interface
using the GNU GDBM library.
\bimodindex
{
gdbm
}
The module defines the following constant and functions:
The module defines the following constant and functions:
...
@@ -15,11 +19,18 @@ Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is
...
@@ -15,11 +19,18 @@ Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is
raised for general mapping errors like specifying an incorrect key.
raised for general mapping errors like specifying an incorrect key.
\end{excdesc}
\end{excdesc}
\begin{funcdesc}
{
open
}{
filename
\,
rwmode
\,
filemode
}
\begin{funcdesc}
{
open
}{
filename
\,
\optional
{
flag
\,
\optional
{
mode
}}}
Open a dbm database and return a mapping object.
\var
{
filename
}
is
Open a dbm database and return a dbm object. The
\var
{
filename
}
the name of the database file (without the
\file
{
.dir
}
or
\file
{
.pag
}
argument is the name of the database file (without the
\file
{
.dir
}
or
extensions),
\var
{
rwmode
}
is
\code
{
'r'
}
,
\code
{
'w'
}
or
\code
{
'rw'
}
to
\file
{
.pag
}
extensions).
open the database fore reading, writing or both respectively,
and
\var
{
filemode
}
is the
\UNIX
{}
mode of the file, used only
The optional
\var
{
flag
}
argument can be
when the database has to be created (but to be supplied at all times).
\code
{
'r'
}
(to open an existing database for reading only --- default),
\code
{
'w'
}
(to open an existing database for reading and writing),
\code
{
'c'
}
(which creates the database if it doesn't exist), or
\code
{
'n'
}
(which always creates a new empty database).
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
}
.
\end{funcdesc}
\end{funcdesc}
Doc/lib/libgdbm.tex
View file @
0bf84751
\section
{
Built-in Module
\sectcode
{
gdbm
}}
\section
{
Built-in Module
\sectcode
{
gdbm
}}
\bimodindex
{
gdbm
}
\bimodindex
{
gdbm
}
Gdbm provides python programs with an interface to the GNU
\code
{
gdbm
}
This module is nearly identical to the
\code
{
dbm
}
module, but uses
database library. Gdbm objects are of the mapping type, so they can be
GDBM instead. Its interface is identical, and not repeated here.
handled just like objects of the built-in
\dfn
{
dictionary
}
type,
except that keys and values are always strings, and printing a gdbm
object doesn't print the keys and values.
The module is based on the Dbm module, modified to use GDBM instead.
Warning: the file formats created by gdbm and dbm are incompatible.
\bimodindex
{
dbm
}
The module defines the following constant and functions:
\renewcommand
{
\indexsubitem
}{
(in module gdbm)
}
\begin{excdesc}
{
error
}
Raised on gdbm-specific errors, such as I/O errors.
\code
{
KeyError
}
is
raised for general mapping errors like specifying an incorrect key.
\end{excdesc}
\begin{funcdesc}
{
open
}{
filename
\,
rwmode
\,
filemode
}
Open a gdbm database and return a mapping object.
\var
{
filename
}
is
the name of the database file,
\var
{
rwmode
}
is
\code
{
'r'
}
,
\code
{
'w'
}
,
\code
{
'c'
}
, or
\code
{
'n'
}
for reader, writer (this also gives read
access), create (writer, but create the database if it doesn't already
exist) and newdb (which will always create a new database). Only one
writer may open a gdbm file and many readers may open the file. Readers
and writers cannot open the gdbm file at the same time. Note that the
\code
{
GDBM
_
FAST
}
mode of opening the database is not supported.
\var
{
filemode
}
is the
\UNIX\
mode of the file, used only when a
database is created (but to be supplied at all times).
\end{funcdesc}
Doc/libdbm.tex
View file @
0bf84751
\section
{
Built-in Module
\sectcode
{
dbm
}}
\section
{
Built-in Module
\sectcode
{
dbm
}}
\bimodindex
{
dbm
}
\bimodindex
{
dbm
}
Dbm provides python programs with an interface to the unix
\code
{
ndbm
}
The
\code
{
dbm
}
module provides an interface to the
{
\UNIX
}
database library. Dbm objects are of the mapping type, so they can be
\code
{
(n)dbm
}
library. Dbm objects behave like mappings
handled just like objects of the built-in
\dfn
{
dictionary
}
type,
(dictionaries), except that keys and values are always strings.
except that keys and values are always strings, and printing a dbm
Printing a dbm object doesn't print the keys and values, and the
object doesn't print the keys and values.
\code
{
items()
}
and
\code
{
values()
}
methods are not supported.
See also the
\code
{
gdbm
}
module, which provides a similar interface
using the GNU GDBM library.
\bimodindex
{
gdbm
}
The module defines the following constant and functions:
The module defines the following constant and functions:
...
@@ -15,11 +19,18 @@ Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is
...
@@ -15,11 +19,18 @@ Raised on dbm-specific errors, such as I/O errors. \code{KeyError} is
raised for general mapping errors like specifying an incorrect key.
raised for general mapping errors like specifying an incorrect key.
\end{excdesc}
\end{excdesc}
\begin{funcdesc}
{
open
}{
filename
\,
rwmode
\,
filemode
}
\begin{funcdesc}
{
open
}{
filename
\,
\optional
{
flag
\,
\optional
{
mode
}}}
Open a dbm database and return a mapping object.
\var
{
filename
}
is
Open a dbm database and return a dbm object. The
\var
{
filename
}
the name of the database file (without the
\file
{
.dir
}
or
\file
{
.pag
}
argument is the name of the database file (without the
\file
{
.dir
}
or
extensions),
\var
{
rwmode
}
is
\code
{
'r'
}
,
\code
{
'w'
}
or
\code
{
'rw'
}
to
\file
{
.pag
}
extensions).
open the database fore reading, writing or both respectively,
and
\var
{
filemode
}
is the
\UNIX
{}
mode of the file, used only
The optional
\var
{
flag
}
argument can be
when the database has to be created (but to be supplied at all times).
\code
{
'r'
}
(to open an existing database for reading only --- default),
\code
{
'w'
}
(to open an existing database for reading and writing),
\code
{
'c'
}
(which creates the database if it doesn't exist), or
\code
{
'n'
}
(which always creates a new empty database).
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
}
.
\end{funcdesc}
\end{funcdesc}
Doc/libgdbm.tex
View file @
0bf84751
\section
{
Built-in Module
\sectcode
{
gdbm
}}
\section
{
Built-in Module
\sectcode
{
gdbm
}}
\bimodindex
{
gdbm
}
\bimodindex
{
gdbm
}
Gdbm provides python programs with an interface to the GNU
\code
{
gdbm
}
This module is nearly identical to the
\code
{
dbm
}
module, but uses
database library. Gdbm objects are of the mapping type, so they can be
GDBM instead. Its interface is identical, and not repeated here.
handled just like objects of the built-in
\dfn
{
dictionary
}
type,
except that keys and values are always strings, and printing a gdbm
object doesn't print the keys and values.
The module is based on the Dbm module, modified to use GDBM instead.
Warning: the file formats created by gdbm and dbm are incompatible.
\bimodindex
{
dbm
}
The module defines the following constant and functions:
\renewcommand
{
\indexsubitem
}{
(in module gdbm)
}
\begin{excdesc}
{
error
}
Raised on gdbm-specific errors, such as I/O errors.
\code
{
KeyError
}
is
raised for general mapping errors like specifying an incorrect key.
\end{excdesc}
\begin{funcdesc}
{
open
}{
filename
\,
rwmode
\,
filemode
}
Open a gdbm database and return a mapping object.
\var
{
filename
}
is
the name of the database file,
\var
{
rwmode
}
is
\code
{
'r'
}
,
\code
{
'w'
}
,
\code
{
'c'
}
, or
\code
{
'n'
}
for reader, writer (this also gives read
access), create (writer, but create the database if it doesn't already
exist) and newdb (which will always create a new database). Only one
writer may open a gdbm file and many readers may open the file. Readers
and writers cannot open the gdbm file at the same time. Note that the
\code
{
GDBM
_
FAST
}
mode of opening the database is not supported.
\var
{
filemode
}
is the
\UNIX\
mode of the file, used only when a
database is created (but to be supplied at all times).
\end{funcdesc}
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