mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Added gdbm docs
This commit is contained in:
parent
e06752b457
commit
b69e0958a5
4 changed files with 62 additions and 0 deletions
|
|
@ -74,6 +74,7 @@ language.
|
|||
\input{libunix} % UNIX ONLY
|
||||
\input{libdbm}
|
||||
\input{libfcntl}
|
||||
\input{libgdbm}
|
||||
\input{libgrp}
|
||||
\input{libposix}
|
||||
\input{libposixfile} % XXX this uses lineii which partparse.py doesn't know
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ language.
|
|||
\input{libunix} % UNIX ONLY
|
||||
\input{libdbm}
|
||||
\input{libfcntl}
|
||||
\input{libgdbm}
|
||||
\input{libgrp}
|
||||
\input{libposix}
|
||||
\input{libposixfile} % XXX this uses lineii which partparse.py doesn't know
|
||||
|
|
|
|||
30
Doc/lib/libgdbm.tex
Normal file
30
Doc/lib/libgdbm.tex
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
\section{Built-in Module \sectcode{gdbm}}
|
||||
\bimodindex{gdbm}
|
||||
|
||||
Gdbm provides python programs with an interface to the GNU \code{gdbm}
|
||||
database library. Gdbm objects are of the mapping type, so they can be
|
||||
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.
|
||||
|
||||
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 doesnt 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 can not 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.
|
||||
\end{funcdesc}
|
||||
30
Doc/libgdbm.tex
Normal file
30
Doc/libgdbm.tex
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
\section{Built-in Module \sectcode{gdbm}}
|
||||
\bimodindex{gdbm}
|
||||
|
||||
Gdbm provides python programs with an interface to the GNU \code{gdbm}
|
||||
database library. Gdbm objects are of the mapping type, so they can be
|
||||
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.
|
||||
|
||||
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 doesnt 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 can not 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.
|
||||
\end{funcdesc}
|
||||
Loading…
Add table
Add a link
Reference in a new issue