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

gh-141004: DocumentPyTraceBack* APIs#141192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
ZeroIntensity wants to merge2 commits intopython:main
base:main
Choose a base branch
Loading
fromZeroIntensity:document-tracebacks

Conversation

@ZeroIntensity
Copy link
Member

@ZeroIntensityZeroIntensity commentedNov 7, 2025
edited
Loading

Comment on lines +1243 to +1244
Return true if *op* is a traceback object, false otherwise. This function
does not account for subtypes.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
Return true if *op* is a traceback object, false otherwise. This function
does not account for subtypes.
Return true if *op* is a traceback object, false otherwise. This function
does not account for subtypes. This is a macro.

This is technically a macro, not a function, I see forByte Array Objects we have a "Type Check Macros" section, I think it would be good to note it some way here too (I think the subheadings would be better), WDYT?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I agree, but we don't do this anywhere else. As far as I know, all_Check functions are documented as functions, but they're really macros. Do you strongly believe we should document it as such here?

Comment on lines +1249 to +1250
Replace the:attr:`~BaseException.__traceback__` attribute on the current
exception with a new traceback pointing to *f*.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggested change
Replace the:attr:`~BaseException.__traceback__` attribute on the current
exception with a new traceback pointing to *f*.
Add theframe *f* to the:attr:`~BaseException.__traceback__` attribute on
the current exception.

I thinkreplace gives the wrong idea here, since we are extending it from my understanding.

Copy link
MemberAuthor

@ZeroIntensityZeroIntensityNov 7, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd say that it replaces it. All exceptions have the__traceback__ attribute, but sometimes it'sNULL/None. In all cases, we're overwriting that pointer. Saying we're "adding" the attribute seems wrong, because that would imply we're adding something new to an attribute dictionary.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@StanFromIrelandStanFromIrelandStanFromIreland left review comments

Assignees

No one assigned

Labels

awaiting core reviewdocsDocumentation in the Doc dirneeds backport to 3.13bugs and security fixesneeds backport to 3.14bugs and security fixesskip news

Projects

Status: Todo

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ZeroIntensity@StanFromIreland

[8]ページ先頭

©2009-2025 Movatter.jp