
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2019-07-02 14:49 by杨昆仑, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 14623 | merged | terry.reedy,2019-07-06 21:22 | |
| PR 14624 | merged | miss-islington,2019-07-06 21:40 | |
| PR 14625 | merged | miss-islington,2019-07-06 21:40 | |
| PR 14626 | merged | miss-islington,2019-07-06 21:41 | |
| Messages (6) | |||
|---|---|---|---|
| msg347144 -(view) | Author: 杨昆仑 (杨昆仑) | Date: 2019-07-02 14:49 | |
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 positive** is inaccurate and confusing. | |||
| msg347373 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-07-05 20:10 | |
Good catch. (In the future, try to include the url, as below.)The full sentence in question, athttps://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' should be 'non-negative'. The next sentence deal with out-of-bounds positions, and these could be specified as '(< 0, > len(list))' | |||
| msg347444 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-07-06 21:40 | |
New changesetf8709e804d16ec5d44b1d2f00d59a0f78df7b792 by Terry Jan Reedy in branch 'master':bpo-37487: Fix PyList_GetItem index description. (GH-14623)https://github.com/python/cpython/commit/f8709e804d16ec5d44b1d2f00d59a0f78df7b792 | |||
| msg347446 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-07-06 21:54 | |
New changesetad3720359faa933d04bde3d3222fd54e73ee7feb by Terry Jan Reedy (Miss Islington (bot)) in branch '3.8':bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14624)https://github.com/python/cpython/commit/ad3720359faa933d04bde3d3222fd54e73ee7feb | |||
| msg347447 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-07-06 21:55 | |
New changeset9c930d076a7225694b369d30636a29acb556c2be by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7':bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14625)https://github.com/python/cpython/commit/9c930d076a7225694b369d30636a29acb556c2be | |||
| msg347448 -(view) | Author: Terry J. Reedy (terry.reedy)*![]() | Date: 2019-07-06 21:55 | |
New changesetdd3862e167d573b6e9a3348c365229ca958d1f1f by Terry Jan Reedy (Miss Islington (bot)) in branch '2.7':bpo-37487: Fix PyList_GetItem index description. (GH-14623) (GH-14626)https://github.com/python/cpython/commit/dd3862e167d573b6e9a3348c365229ca958d1f1f | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:17 | admin | set | github: 81668 |
| 2019-07-06 21:56:26 | terry.reedy | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2019-07-06 21:55:44 | terry.reedy | set | messages: +msg347448 |
| 2019-07-06 21:55:22 | terry.reedy | set | messages: +msg347447 |
| 2019-07-06 21:54:59 | terry.reedy | set | messages: +msg347446 |
| 2019-07-06 21:41:02 | miss-islington | set | pull_requests: +pull_request14440 |
| 2019-07-06 21:40:51 | miss-islington | set | pull_requests: +pull_request14439 |
| 2019-07-06 21:40:44 | miss-islington | set | stage: commit review -> patch review pull_requests: +pull_request14438 |
| 2019-07-06 21:40:30 | terry.reedy | set | messages: +msg347444 |
| 2019-07-06 21:28:06 | terry.reedy | set | assignee:docs@python ->terry.reedy stage: patch review -> commit review title: PyList_GetItem() document regarding index -> PyList_GetItem() document: index can be 0 versions: + Python 2.7, Python 3.7, Python 3.8, Python 3.9, - Python 3.5 |
| 2019-07-06 21:22:35 | terry.reedy | set | keywords: +patch stage: patch review pull_requests: +pull_request14437 |
| 2019-07-05 20:10:22 | terry.reedy | set | nosy: +terry.reedy messages: +msg347373 |
| 2019-07-02 14:49:41 | 杨昆仑 | create | |