Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ silent
Function
silent
Lib/test/test_profile.py:159–165 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
157
158
@contextmanager
159
def
silent():
160
stdout = sys.stdout
161
try
:
162
sys.stdout = StringIO()
163
yield
164
finally:
165
sys.stdout = stdout
166
167
168
def
main():
Callers
2
test_run
Method · 0.85
test_runctx
Method · 0.85
Calls
1
StringIO
Class · 0.90
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…