File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Misc/NEWS.d/next/Documentation Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -59,9 +59,9 @@ List Objects
5959.. c :function :: PyObject* PyList_GetItem (PyObject *list, Py_ssize_t index)
6060
6161 Return the object at position *index * in the list pointed to by *list *. The
62- position must be positive, indexing from the end of the list is not
63- supported. If *index * is out of bounds, return * NULL * and set an
64- :exc: `IndexError ` exception.
62+ position must be non-negative; indexing from the end of the list is not
63+ supported. If *index * is out of bounds (<0 or >=len(list)),
64+ return *NULL* and set an :exc:`IndexError` exception.
6565
6666
6767.. c:function:: PyObject* PyList_GET_ITEM(PyObject *list, Py_ssize_t i)
Original file line number Diff line number Diff line change 1+ Fix PyList_GetItem index description to include 0.
You can’t perform that action at this time.
0 commit comments