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

Function _parse_value_tb

Lib/traceback.py:113–125  ·  view source on GitHub ↗
(exc, value, tb)

Source from the content-addressed store, hash-verified

111_sentinel = _Sentinel()
112
113def _parse_value_tb(exc, value, tb):
114 if (value is _sentinel) != (tb is _sentinel):
115 raise ValueError("Both or neither of value and tb must be given")
116 if value is tb is _sentinel:
117 if exc is not None:
118 if isinstance(exc, BaseException):
119 return exc, exc.__traceback__
120
121 raise TypeError(f'Exception expected for value, '
122 f'{type(exc).__name__} found')
123 else:
124 return None, None
125 return value, tb
126
127
128def print_exception(exc, /, value=_sentinel, tb=_sentinel, limit=None, \

Callers 2

print_exceptionFunction · 0.85
format_exceptionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…