]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Wrap set_location.
authorMartin v. Löwis <martin@v.loewis.de>
Fri, 10 Aug 2007 07:47:16 +0000 (07:47 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Fri, 10 Aug 2007 07:47:16 +0000 (07:47 +0000)
Lib/bsddb/__init__.py

index 622530465ea2250de15a6e713093608e801836bc..dfa77fd16241e88bb99e0beaad030181caa30b64 100644 (file)
@@ -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()