MCPcopy Index your code
hub / github.com/RustPython/RustPython / _setval

Method _setval

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

Source from the content-addressed store, hash-verified

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

Callers 1

__setitem__Method · 0.95

Calls 4

lenFunction · 0.85
openMethod · 0.45
seekMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected