Skip to content

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 25, 2025

…ction

Add also PyUnstable_InterpreterFrame type.
@vstinner
Copy link
Member Author

See #141665 (review) for the rationale on adding this function.

The interpreter's internal frame representation.
The structure is intentionally opaque and there are currently no plans to
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The structure is intentionally opaque and there are currently no plans to
The structure is intentionally opaque, and there are currently no plans to

PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine(struct _PyInterpreterFrame *frame);
PyAPI_FUNC(int) PyUnstable_InterpreterFrame_GetLine(
PyUnstable_InterpreterFrame *frame);

Copy link
Member

Choose a reason for hiding this comment

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

Maybe it'll be better to add inline comment from docs?

@@ -0,0 +1,2 @@
Add :c:func:`PyUnstable_InterpreterFrame_GetFrameObject` to get a frame
object from an interpreter frame. Patch by Victor Stinner.
Copy link
Member

Choose a reason for hiding this comment

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

Should we mention renaming of _PyInterpreterFrame into PyUnstable_InterpreterFrame?
And in the whatsnew file.

return frame_generator_get((PyObject *)frame, NULL);
}


Copy link
Member

Choose a reason for hiding this comment

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

Adding two blank lines is intentional, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants