This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients docs@python, eric.snow
Date 2019-03-01.16:36:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551458200.72.0.727788487318.issue36157@roundup.psfhosted.org>
In-reply-to
Content
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 f5df46d701d29baf738365da6fcf1b8a3ceabb71) 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
[2] https://docs.python.org/3/c-api/init.html#advanced-debugger-support
History
Date User Action Args
2019-03-01 16:36:40eric.snowsetrecipients: + eric.snow, docs@python
2019-03-01 16:36:40eric.snowsetmessageid: <1551458200.72.0.727788487318.issue36157@roundup.psfhosted.org>
2019-03-01 16:36:40eric.snowlinkissue36157 messages
2019-03-01 16:36:40eric.snowcreate