summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-08-10 07:47:16 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-08-10 07:47:16 (GMT)
commit9b01862d32840abc6479427e1b4ad86f2df46bbb (patch)
tree4ba44c32f5f24669ec0373c4769cfbb0a213a18e
parentc32f71dd56afb0760e4c9fad102b6b21d66b82f1 (diff)
downloadcpython-9b01862d32840abc6479427e1b4ad86f2df46bbb.zip
cpython-9b01862d32840abc6479427e1b4ad86f2df46bbb.tar.gz
cpython-9b01862d32840abc6479427e1b4ad86f2df46bbb.tar.bz2
Wrap set_location.
-rw-r--r--Lib/bsddb/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py
index 6225304..dfa77fd 100644
--- a/Lib/bsddb/__init__.py
+++ b/Lib/bsddb/__init__.py
@@ -346,6 +346,10 @@ class StringKeys(UserDict.DictMixin, _ExposedProperties):
key, value = self.db.last()
return key.decode("utf-8"), value
+ def set_location(self, key):
+ key, value = self.db.set_location(key.encode("utf-8"))
+ return key.decode("utf-8"), value
+
def sync(self):
return self.db.sync()
@@ -409,6 +413,10 @@ class StringValues(UserDict.DictMixin, _ExposedProperties):
key, value = self.db.last()
return key, value.decode("utf-8")
+ def set_location(self, key):
+ key, value = self.db.set_location(key)
+ return key, value.decode("utf-8")
+
def sync(self):
return self.db.sync()