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

Method init_db

Lib/test/test_dbm.py:56–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

54 }
55
56 def init_db(self):
57 f = dbm.open(_fname, 'n')
58 for k in self._dict:
59 f[k.encode("ascii")] = self._dict[k]
60 f.close()
61
62 def keys_helper(self, f):
63 keys = sorted(k.decode("ascii") for k in f.keys())

Calls 3

openMethod · 0.45
encodeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected