MCPcopy Index your code
hub / github.com/ipython/ipython / _safe_string

Function _safe_string

IPython/core/tbtools.py:67–72  ·  view source on GitHub ↗
(value: Any, what: Any, func: Any = str)

Source from the content-addressed store, hash-verified

65
66
67def _safe_string(value: Any, what: Any, func: Any = str) -> str:
68 # Copied from cpython/Lib/traceback.py
69 try:
70 return func(value)
71 except:
72 return f"<{what} {func.__name__}() failed>"
73
74
75def _format_traceback_lines(

Callers 2

format_exceptionMethod · 0.85
format_exceptionMethod · 0.85

Calls 1

funcFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…