-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-38557: Improve documentation for list and tuple C API. #16925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-38557: Improve documentation for list and tuple C API. #16925
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that the re-wordings and additions are technically correct. They otherwise look good to me.
@@ -111,17 +112,16 @@ List Objects | |||
|
|||
Return a list of the objects in *list* containing the objects *between* *low* | |||
and *high*. Return *NULL* and set an exception if unsuccessful. Analogous | |||
to ``list[low:high]``. Negative indices, as when slicing from Python, are not | |||
supported. | |||
to ``list[low:high]``. Indexing from the end of the list is not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By itself, this is not obviously much of an improvement, but in the context of the earlier sentence for PyList_GetItem, "The position must be non-negative; indexing from the end of the list is not supported.", I think it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, negative indices are supported. But they do not count from the end.
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7, 3.8. |
GH-16933 is a backport of this pull request to the 3.8 branch. |
GH-16934 is a backport of this pull request to the 3.7 branch. |
GH-16935 is a backport of this pull request to the 2.7 branch. |
copy-and-paste error from python#16925
https://bugs.python.org/issue38557