mirror of
https://github.com/python/cpython.git
synced 2025-09-17 14:16:02 +00:00
gh-134004: Added the reorganize() methods to dbm.sqlite, dbm.dumb and shelve (GH-134028)
They are similar to the same named method in dbm.gnu.
This commit is contained in:
parent
b595237166
commit
f806463e16
9 changed files with 172 additions and 6 deletions
|
@ -171,6 +171,11 @@ class Shelf(collections.abc.MutableMapping):
|
|||
if hasattr(self.dict, 'sync'):
|
||||
self.dict.sync()
|
||||
|
||||
def reorganize(self):
|
||||
self.sync()
|
||||
if hasattr(self.dict, 'reorganize'):
|
||||
self.dict.reorganize()
|
||||
|
||||
|
||||
class BsdDbShelf(Shelf):
|
||||
"""Shelf implementation using the "BSD" db interface.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue