The Wayback Machine - https://web.archive.org/web/20250525001546/https://github.com/python/cpython/issues/102705
Skip to content

Add getouterframe function to inspect module #102705

Closed as not planned
Closed as not planned
@rprater

Description

@rprater

Currently, the inspect module has the getouterframes function which gets a list of FrameInfo objects for a frame and all outer frames. However, there is no function that just gets the next outer frame (the current frame’s caller).

It is possible to get that frame by using the f_back attribute from the frame object and then convert the resulting object into a FrameInfo instance. However, that does seem less optimal and it would be much easier to just have a getouterframe function.

I would very much like to take on creating the getouterframe function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions