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

Method truncate

Lib/_pyio.py:1285–1290  ·  view source on GitHub ↗
(self, pos=None)

Source from the content-addressed store, hash-verified

1283 return written
1284
1285 def truncate(self, pos=None):
1286 with self._write_lock:
1287 self._flush_unlocked()
1288 if pos is None:
1289 pos = self.raw.tell()
1290 return self.raw.truncate(pos)
1291
1292 def flush(self):
1293 with self._write_lock:

Callers

nothing calls this directly

Calls 3

_flush_unlockedMethod · 0.95
tellMethod · 0.45
truncateMethod · 0.45

Tested by

no test coverage detected