summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libdbhash.tex
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-09-12 06:33:37 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-09-12 06:33:37 (GMT)
commitdeadbf50e4cc3c541e706d5bf1aa73624bed36a6 (patch)
tree407b9e5f2aa93866cdda5fb5b70fee3d49d2de0e /Doc/lib/libdbhash.tex
parent74c8e55f3b64b8819a1950be4ac1323c74931cc2 (diff)
downloadcpython-deadbf50e4cc3c541e706d5bf1aa73624bed36a6.zip
cpython-deadbf50e4cc3c541e706d5bf1aa73624bed36a6.tar.gz
cpython-deadbf50e4cc3c541e706d5bf1aa73624bed36a6.tar.bz2
SF #662923
Add support for the iterator and mapping protocols. For Py2.3, this was done for shelve, dumbdbm and other mapping objects, but not for bsddb and dbhash which were inadvertently missed.
Diffstat (limited to 'Doc/lib/libdbhash.tex')
-rw-r--r--Doc/lib/libdbhash.tex14
1 files changed, 7 insertions, 7 deletions
diff --git a/Doc/lib/libdbhash.tex b/Doc/lib/libdbhash.tex
index 00a6d08..ecaa6c9 100644
--- a/Doc/lib/libdbhash.tex
+++ b/Doc/lib/libdbhash.tex
@@ -51,23 +51,23 @@ This module provides an exception and a function:
\subsection{Database Objects \label{dbhash-objects}}
The database objects returned by \function{open()} provide the methods
-common to all the DBM-style databases. The following methods are
-available in addition to the standard methods.
+common to all the DBM-style databases and mapping objects. The following
+methods are available in addition to the standard methods.
\begin{methoddesc}[dbhash]{first}{}
- It's possible to loop over every key in the database using this method
- and the \method{next()} method. The traversal is ordered by
+ It's possible to loop over every key/value pair in the database using
+ this method and the \method{next()} method. The traversal is ordered by
the databases internal hash values, and won't be sorted by the key
values. This method returns the starting key.
\end{methoddesc}
\begin{methoddesc}[dbhash]{last}{}
- Return the last key in a database traversal. This may be used to
+ Return the last key/value pair in a database traversal. This may be used to
begin a reverse-order traversal; see \method{previous()}.
\end{methoddesc}
\begin{methoddesc}[dbhash]{next}{}
- Returns the key next key in a database traversal. The
+ Returns the key next key/value pair in a database traversal. The
following code prints every key in the database \code{db}, without
having to create a list in memory that contains them all:
@@ -79,7 +79,7 @@ for i in xrange(1, len(d)):
\end{methoddesc}
\begin{methoddesc}[dbhash]{previous}{}
- Returns the previous key in a forward-traversal of the database.
+ Returns the previous key/value pair in a forward-traversal of the database.
In conjunction with \method{last()}, this may be used to implement
a reverse-order traversal.
\end{methoddesc}