Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Feature or enhancement
This function does not have this param:
Lines 151 to 166 in7f9a99e
| defformat_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__``. | |
| """ | |
| ifvalueis_sentinel: | |
| value=exc | |
| te=TracebackException(type(value),value,None,compact=True) | |
| returnlist(te.format_exception_only()) | |
While theformat_exception_only method ofTracebackException does have this param. So, in order to proceed with#104150 I need this function to give meExceptionGroup information.
I have a PR ready.