mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Wrap set_location.
This commit is contained in:
parent
c32f71dd56
commit
9b01862d32
1 changed files with 8 additions and 0 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue