-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
This function does not have this param:
Lines 151 to 166 in 7f9a99e
| 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
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancementA feature request or enhancement