diff options
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/init.rst | 5 | ||||
-rw-r--r-- | Doc/c-api/list.rst | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 5add7fe..fd6a9a2 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -319,8 +319,9 @@ Process-wide parameters .. cfunction:: void Py_SetPythonHome(char *home) Set the default "home" directory, that is, the location of the standard - Python libraries. The libraries are searched in - :file:`{home}/lib/python{version}` and :file:`{home}/lib/python{version}`. + Python libraries. See :envvar:`PYTHONHOME` for the meaning of the + argument string. + The argument should point to a zero-terminated character string in static storage whose contents will not change for the duration of the program's execution. No code in the Python interpreter will change the contents of diff --git a/Doc/c-api/list.rst b/Doc/c-api/list.rst index 242b4e6..d24aa72 100644 --- a/Doc/c-api/list.rst +++ b/Doc/c-api/list.rst @@ -42,7 +42,7 @@ List Objects .. note:: - If *length* is greater than zero, the returned list object's items are + If *len* is greater than zero, the returned list object's items are set to ``NULL``. Thus you cannot use abstract API functions such as :cfunc:`PySequence_SetItem` or expose the object to Python code before setting all items to a real object with :cfunc:`PyList_SetItem`. @@ -75,9 +75,9 @@ List Objects .. cfunction:: PyObject* PyList_GetItem(PyObject *list, Py_ssize_t index) - Return the object at position *pos* in the list pointed to by *p*. The + Return the object at position *index* in the list pointed to by *list*. The position must be positive, indexing from the end of the list is not - supported. If *pos* is out of bounds, return *NULL* and set an + supported. If *index* is out of bounds, return *NULL* and set an :exc:`IndexError` exception. .. versionchanged:: 2.5 |