summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libbsddb.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-01-05 06:44:19 (GMT)
committerFred Drake <fdrake@acm.org>2001-01-05 06:44:19 (GMT)
commite1d4715a6fc6b4566a8afebcdd03dc8607021d3d (patch)
treebb4100aa6a74ec34f26f83e013f2c8ced7d360f9 /Doc/lib/libbsddb.tex
parenta4d18a008f3908c92940e635d787c56f19cfca80 (diff)
downloadcpython-e1d4715a6fc6b4566a8afebcdd03dc8607021d3d.zip
cpython-e1d4715a6fc6b4566a8afebcdd03dc8607021d3d.tar.gz
cpython-e1d4715a6fc6b4566a8afebcdd03dc8607021d3d.tar.bz2
Update explanation of the set_location() method to indicate that in
BTree databases, the key need not be in the database. Also, tell about the exception if the key is not in the DB for other DB types. This closes SF bug #127377.
Diffstat (limited to 'Doc/lib/libbsddb.tex')
-rw-r--r--Doc/lib/libbsddb.tex8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/lib/libbsddb.tex b/Doc/lib/libbsddb.tex
index e27aff8..925e512 100644
--- a/Doc/lib/libbsddb.tex
+++ b/Doc/lib/libbsddb.tex
@@ -103,7 +103,13 @@ Return \code{1} if the DB file contains the argument as a key.
\end{methoddesc}
\begin{methoddesc}{set_location}{key}
-Set the cursor to the item indicated by the key and return it.
+Set the cursor to the item indicated by \var{key} and return a tuple
+containing the key and its value. For binary tree databases (opened
+using \function{btopen()}), if \var{key} does not actually exist in
+the database, the cursor will point to the next item in sorted order
+and return that key and value. For other databases,
+\exception{KeyError} will be raised if \var{key} is not found in the
+database.
\end{methoddesc}
\begin{methoddesc}{first}{}