Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Addshow_group param totraceback.format_exception_only function #111388

Closed
Assignees
sobolevn
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement
@sobolevn

Description

@sobolevn

Feature or enhancement

This function does not have this param:

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.

Linked PRs

Metadata

Metadata

Assignees

Labels

stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp