New submission from Eric Snow <ericsnowcurren...@gmail.com>:

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

----------
assignee: docs@python
components: Documentation
keywords: easy
messages: 336929
nosy: docs@python, eric.snow
priority: normal
severity: normal
stage: needs patch
status: open
title: Document PyInterpreterState_Main().
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue36157>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to