GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
GeezerVison is showing github.com — gh-141518: Add PyUnstable_InterpreterFrame_GetFrameObject() function by vstinner · Pull Request #141950 · python/cpython Conversation
|
|
See #141665 (review) for the rationale on adding this function. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: Mikhail Efimov <[email protected]>
|
I don't think we should add If someone wants a frame object, they can get it directly with |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Well, @encukou requested such API for PyUnstable_InterpreterState_SetEvalFrameFunc(): #141665 (review) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Should it be |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
In a frame evaluation function, you don't want the frame object. It is just a bulkier, slower version of the frame you already have. The frame object contains no additional information, just a pointer back to the internal frame. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Yeah, you should use the internal C API to access the interpreter frame: pycore_interpframe.h provides many functions, such as:
I know that it's kind of unusual to have a public function to set a frame evalution function, but need the internal C API to implement it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The C API Working Group decided to not add a public function for this feature, but keep the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.