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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document PyInterpreterState_Main(). #80338
Comments
PyInterpreterState_Main() is a function in the public C-API that returns a pointer to the main interpreter's state. The main interpreter is the first one created by the CPython runtime during startup (e.g. when the "python" command is run). Documentation for PyInterpreterState_Main() should be on the "Initialization, Finalization, and Threads" page of the C-API docs, probably in the "Sub-interpreter support" section. [1] It could also possibly go in the "Advanced Debugger Support" section. [2] FYI, I added PyInterpreterState_Main() at PyCon US 2017 (commit f5df46d) when I merged Nick Coghlan's internal implementation of PEP-432. So it has been available since 3.7. [1] https://docs.python.org/3/c-api/init.html#sub-interpreter-support |
@Mariatta do you want to keep this for the mentored sprint at PyCon? |
Since there was no response, I decided to open a PR for this. |
As I noted on the PR, this might be a good chance to make sure the C-API docs are clear about what the "main" interpreter is. |
I will work on this in a separate PR. I opened #bpo-36487 (https://bugs.python.org/issue36487) to track this. |
Thanks for working on this, Joannah! :) |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: