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

Method _setval

Lib/dbm/dumb.py:172–176  ·  view source on GitHub ↗
(self, pos, val)

Source from the content-addressed store, hash-verified

170 # pos to hold val, without overwriting some other value. Return
171 # pair (pos, len(val)).
172 def _setval(self, pos, val):
173 with _io.open(self._datfile, 'rb+') as f:
174 f.seek(pos)
175 f.write(val)
176 return (pos, len(val))
177
178 # key is a new key whose associated value starts in the data file
179 # at offset pos and with length siz. Add an index record to

Callers 1

__setitem__Method · 0.95

Calls 3

openMethod · 0.45
seekMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected