Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ _safe_string
Function
_safe_string
Lib/traceback.py:210–214 ·
view source on GitHub ↗
(value, what, func=str)
Source
from the content-addressed store, hash-verified
208
209
210
def
_safe_string(value, what, func=str):
211
try
:
212
return
func(value)
213
except
:
214
return
f
'<{what} {func.__name__}() failed>'
215
216
# --
217
Callers
4
_format_final_exc_line
Function · 0.85
__init__
Method · 0.85
__init__
Method · 0.85
format_exception_only
Method · 0.85
Calls
1
func
Function · 0.50
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…