]> granicus.if.org Git - python/commitdiff
Update explanation of the set_location() method to indicate that in
authorFred Drake <fdrake@acm.org>
Fri, 5 Jan 2001 06:44:19 +0000 (06:44 +0000)
committerFred Drake <fdrake@acm.org>
Fri, 5 Jan 2001 06:44:19 +0000 (06:44 +0000)
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.

Doc/lib/libbsddb.tex

index e27aff8500bebce59082ce39449e5fa1a072a40d..925e51269db549ec47d756ba5c0f95a19ef5310c 100644 (file)
@@ -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}{}