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.  It could also possibly go in the "Advanced Debugger Support" section. 
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.
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
The text was updated successfully, but these errors were encountered: