[issue37487] PyList_GetItem() document regarding index

2019-07-06 Thread Terry J. Reedy
Change by Terry J. Reedy : -- keywords: +patch pull_requests: +14437 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14623 ___ Python tracker ___ _

[issue37487] PyList_GetItem() document regarding index

2019-07-05 Thread Terry J. Reedy
Terry J. Reedy added the comment: Good catch. (In the future, try to include the url, as below.) The full sentence in question, at https://docs.python.org/3/c-api/list.html#c.PyList_GetItem, is "The position must be positive, indexing from the end of the list is not supported." 'positive'

[issue37487] PyList_GetItem() document regarding index

2019-07-02 Thread 杨昆仑
New submission from 杨昆仑 : The document of this function (PyList_GetItem()) says: "Return the object at position index in the list pointed to by list. The position must be **positive**,". However test shows the correct position index should be from 0 to len(list)-1. The claim of index **must be