Feature or enhancement
This function does not have this param:
|
def format_exception_only(exc, /, value=_sentinel): |
|
"""Format the exception part of a traceback. |
|
|
|
The return value is a list of strings, each ending in a newline. |
|
|
|
The list contains the exception's message, which is |
|
normally a single string; however, for :exc:`SyntaxError` exceptions, it |
|
contains several lines that (when printed) display detailed information |
|
about where the syntax error occurred. Following the message, the list |
|
contains the exception's ``__notes__``. |
|
""" |
|
if value is _sentinel: |
|
value = exc |
|
te = TracebackException(type(value), value, None, compact=True) |
|
return list(te.format_exception_only()) |
|
|
While the format_exception_only method of TracebackException does have this param. So, in order to proceed with #104150 I need this function to give me ExceptionGroup information.
I have a PR ready.
Linked PRs
Feature or enhancement
This function does not have this param:
cpython/Lib/traceback.py
Lines 151 to 166 in 7f9a99e
While the
format_exception_onlymethod ofTracebackExceptiondoes have this param. So, in order to proceed with #104150 I need this function to give meExceptionGroupinformation.I have a PR ready.
Linked PRs
show_grouptotraceback.format_exception_only#111390