summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-09-10 04:44:29 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-09-10 04:44:29 (GMT)
commit0d6e8cde1a9470b12477096ea3e0560e9ccd2c58 (patch)
tree3db59765d8f3f0a7b8dffd0a7c964bda23629963
parentbed92ee2b21dab6c75b75effcea901d32be689b8 (diff)
downloadcpython-0d6e8cde1a9470b12477096ea3e0560e9ccd2c58.zip
cpython-0d6e8cde1a9470b12477096ea3e0560e9ccd2c58.tar.gz
cpython-0d6e8cde1a9470b12477096ea3e0560e9ccd2c58.tar.bz2
SF bug #802302: Invalid documentation for dbhash.
The documentation severely departed for the actual implementation.
-rw-r--r--Doc/lib/libdbhash.tex19
1 files changed, 9 insertions, 10 deletions
diff --git a/Doc/lib/libdbhash.tex b/Doc/lib/libdbhash.tex
index 4b856de..00a6d08 100644
--- a/Doc/lib/libdbhash.tex
+++ b/Doc/lib/libdbhash.tex
@@ -66,23 +66,22 @@ available in addition to the standard methods.
begin a reverse-order traversal; see \method{previous()}.
\end{methoddesc}
-\begin{methoddesc}[dbhash]{next}{key}
- Returns the key that follows \var{key} in the traversal. The
+\begin{methoddesc}[dbhash]{next}{}
+ Returns the key next key 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:
\begin{verbatim}
-k = db.first()
-while k != None:
- print k
- k = db.next(k)
+print db.first()
+for i in xrange(1, len(d)):
+ print db.next()
\end{verbatim}
\end{methoddesc}
-\begin{methoddesc}[dbhash]{previous}{key}
- Return the key that comes before \var{key} in a forward-traversal of
- the database. In conjunction with \method{last()}, this may be used
- to implement a reverse-order traversal.
+\begin{methoddesc}[dbhash]{previous}{}
+ Returns the previous key in a forward-traversal of the database.
+ In conjunction with \method{last()}, this may be used to implement
+ a reverse-order traversal.
\end{methoddesc}
\begin{methoddesc}[dbhash]{sync}{}