Commit 0d6e8cde authored by Raymond Hettinger's avatar Raymond Hettinger

SF bug #802302: Invalid documentation for dbhash.

The documentation severely departed for the actual implementation.
parent bed92ee2
...@@ -66,23 +66,22 @@ available in addition to the standard methods. ...@@ -66,23 +66,22 @@ available in addition to the standard methods.
begin a reverse-order traversal; see \method{previous()}. begin a reverse-order traversal; see \method{previous()}.
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}[dbhash]{next}{key} \begin{methoddesc}[dbhash]{next}{}
Returns the key that follows \var{key} in the traversal. The Returns the key next key in a database traversal. The
following code prints every key in the database \code{db}, without following code prints every key in the database \code{db}, without
having to create a list in memory that contains them all: having to create a list in memory that contains them all:
\begin{verbatim} \begin{verbatim}
k = db.first() print db.first()
while k != None: for i in xrange(1, len(d)):
print k print db.next()
k = db.next(k)
\end{verbatim} \end{verbatim}
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}[dbhash]{previous}{key} \begin{methoddesc}[dbhash]{previous}{}
Return the key that comes before \var{key} in a forward-traversal of Returns the previous key in a forward-traversal of the database.
the database. In conjunction with \method{last()}, this may be used In conjunction with \method{last()}, this may be used to implement
to implement a reverse-order traversal. a reverse-order traversal.
\end{methoddesc} \end{methoddesc}
\begin{methoddesc}[dbhash]{sync}{} \begin{methoddesc}[dbhash]{sync}{}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment