[docs] [issue31470] Py_Initialize documentation wrong
report at bugs.python.org
Thu Sep 14 12:31:02 EDT 2017
New submission from Jim Jewett:
Per https://docs.python.org/3/c-api/init.html#initializing-and-finalizing-the-interpreter Py_Initialize() "should be called before using any other Python/C API functions; with the exception of Py_SetProgramName(), Py_SetPythonHome() and Py_SetPath()."
(1) I suspect that should be either Py_Initialize() or Py_InitializeEx().
(2) Other functions can also be called first. The ones I notice are:
(2a) Py_IsInitialized() wouldn't be useful if you couldn't call it first.
(2b) Py_SetStandardStreamEncoding explicitly says it *should* be called before Py_Initialize, if it is called at all.
(Probably applies to earlier python versions as well.)
assignee: docs at python
nosy: Jim.Jewett, docs at python
title: Py_Initialize documentation wrong
versions: Python 3.6
Python tracker <report at bugs.python.org>
More information about the docs