Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ truncate
Method
truncate
Lib/doctest.py:287–289 ·
view source on GitHub ↗
(self, size=None)
Source
from the content-addressed store, hash-verified
285
return
result
286
287
def
truncate(self, size=None):
288
self.seek(size)
289
StringIO.truncate(self)
290
291
# Worst-case linear-time ellipsis matching.
292
def
_ellipsis_match(want, got):
Callers
1
__run
Method · 0.45
Calls
1
seek
Method · 0.45
Tested by
no test coverage detected