Commit dd3862e1 authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by Terry Jan Reedy

bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14626)

0 is a legal index.
(cherry picked from commit f8709e80)
Co-authored-by: default avatarTerry Jan Reedy <tjreedy@udel.edu>
parent 55270d09
......@@ -76,9 +76,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.
.. versionchanged:: 2.5
This function used an :c:type:`int` for *index*. This might require
......
Fix PyList_GetItem index description to include 0.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment