diff options
Diffstat (limited to 'Doc/c-api/list.rst')
-rw-r--r-- | Doc/c-api/list.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/c-api/list.rst b/Doc/c-api/list.rst index 279783a..dc90266 100644 --- a/Doc/c-api/list.rst +++ b/Doc/c-api/list.rst @@ -59,9 +59,9 @@ List Objects .. c:function:: PyObject* PyList_GetItem(PyObject *list, Py_ssize_t index) 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 *index* is out of bounds, return *NULL* and set an - :exc:`IndexError` exception. + position must be non-negative; indexing from the end of the list is not + supported. If *index* is out of bounds (<0 or >=len(list)), + return *NULL* and set an :exc:`IndexError` exception. .. c:function:: PyObject* PyList_GET_ITEM(PyObject *list, Py_ssize_t i) |