Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b69e095

Browse files
committed
Added gdbm docs
1 parent e06752b commit b69e095

4 files changed

Lines changed: 62 additions & 0 deletions

File tree

Doc/lib.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
\input{libunix} % UNIX ONLY
7575
\input{libdbm}
7676
\input{libfcntl}
77+
\input{libgdbm}
7778
\input{libgrp}
7879
\input{libposix}
7980
\input{libposixfile} % XXX this uses lineii which partparse.py doesn't know

Doc/lib/lib.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
\input{libunix} % UNIX ONLY
7575
\input{libdbm}
7676
\input{libfcntl}
77+
\input{libgdbm}
7778
\input{libgrp}
7879
\input{libposix}
7980
\input{libposixfile} % XXX this uses lineii which partparse.py doesn't know

Doc/lib/libgdbm.tex

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
\section{Built-in Module \sectcode{gdbm}}
2+
\bimodindex{gdbm}
3+
4+
Gdbm provides python programs with an interface to the GNU \code{gdbm}
5+
database library. Gdbm objects are of the mapping type, so they can be
6+
handled just like objects of the built-in \dfn{dictionary} type,
7+
except that keys and values are always strings, and printing a gdbm
8+
object doesn't print the keys and values.
9+
10+
The module is based on the Dbm module, modified to use GDBM instead.
11+
12+
The module defines the following constant and functions:
13+
14+
\renewcommand{\indexsubitem}{(in module gdbm)}
15+
\begin{excdesc}{error}
16+
Raised on gdbm-specific errors, such as I/O errors. \code{KeyError} is
17+
raised for general mapping errors like specifying an incorrect key.
18+
\end{excdesc}
19+
20+
\begin{funcdesc}{open}{filename\, rwmode\, filemode}
21+
Open a gdbm database and return a mapping object. \var{filename} is
22+
the name of the database file, \var{rwmode} is \code{'r'}, \code{'w'},
23+
\code{'c'}, or \code{'n'} for reader, writer (this also gives read
24+
access), create (writer, but create the database if it doesnt already
25+
exist) and newdb (which will always create a new database). Only one
26+
writer may open a gdbm file and many readers may open the file. Readers
27+
and writers can not open the gdbm file at the same time. Note that the
28+
\code{GDBM_FAST} mode of opening the database is not supported. \var{filemode}
29+
is the unix mode of the file, used only when a database is created.
30+
\end{funcdesc}

Doc/libgdbm.tex

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
\section{Built-in Module \sectcode{gdbm}}
2+
\bimodindex{gdbm}
3+
4+
Gdbm provides python programs with an interface to the GNU \code{gdbm}
5+
database library. Gdbm objects are of the mapping type, so they can be
6+
handled just like objects of the built-in \dfn{dictionary} type,
7+
except that keys and values are always strings, and printing a gdbm
8+
object doesn't print the keys and values.
9+
10+
The module is based on the Dbm module, modified to use GDBM instead.
11+
12+
The module defines the following constant and functions:
13+
14+
\renewcommand{\indexsubitem}{(in module gdbm)}
15+
\begin{excdesc}{error}
16+
Raised on gdbm-specific errors, such as I/O errors. \code{KeyError} is
17+
raised for general mapping errors like specifying an incorrect key.
18+
\end{excdesc}
19+
20+
\begin{funcdesc}{open}{filename\, rwmode\, filemode}
21+
Open a gdbm database and return a mapping object. \var{filename} is
22+
the name of the database file, \var{rwmode} is \code{'r'}, \code{'w'},
23+
\code{'c'}, or \code{'n'} for reader, writer (this also gives read
24+
access), create (writer, but create the database if it doesnt already
25+
exist) and newdb (which will always create a new database). Only one
26+
writer may open a gdbm file and many readers may open the file. Readers
27+
and writers can not open the gdbm file at the same time. Note that the
28+
\code{GDBM_FAST} mode of opening the database is not supported. \var{filemode}
29+
is the unix mode of the file, used only when a database is created.
30+
\end{funcdesc}

0 commit comments

Comments
 (0)