MCPcopy Index your code
hub / github.com/python/cpython / sync

Method sync

Lib/shelve.py:176–184  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

174 self.close()
175
176 def sync(self):
177 if self.writeback and self.cache:
178 self.writeback = False
179 for key, entry in self.cache.items():
180 self[key] = entry
181 self.writeback = True
182 self.cache = {}
183 if hasattr(self.dict, 'sync'):
184 self.dict.sync()
185
186 def reorganize(self):
187 self.sync()

Callers 2

closeMethod · 0.95
reorganizeMethod · 0.95

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected