Skip to content
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

Merged

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Oct 25, 2019

https://bugs.python.org/issue38557

Copy link
Member

@terryjreedy terryjreedy left a comment

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.
Copy link
Member

@terryjreedy terryjreedy Oct 26, 2019

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.

Copy link
Member Author

@serhiy-storchaka serhiy-storchaka Oct 26, 2019

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.

@serhiy-storchaka serhiy-storchaka merged commit d898d20 into python:master Oct 26, 2019
4 checks passed
@serhiy-storchaka serhiy-storchaka deleted the docs-tuple-getslice branch Oct 26, 2019
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Oct 26, 2019

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.7, 3.8.
🐍🍒🤖

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Oct 26, 2019

GH-16933 is a backport of this pull request to the 3.8 branch.

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Oct 26, 2019

GH-16934 is a backport of this pull request to the 3.7 branch.

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Oct 26, 2019

GH-16935 is a backport of this pull request to the 2.7 branch.

miss-islington added a commit to miss-islington/cpython that referenced this issue Oct 26, 2019
…16925)

(cherry picked from commit d898d20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit to miss-islington/cpython that referenced this issue Oct 26, 2019
…16925)

(cherry picked from commit d898d20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this issue Oct 26, 2019
(cherry picked from commit d898d20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this issue Oct 26, 2019
(cherry picked from commit d898d20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
miss-islington added a commit that referenced this issue Oct 26, 2019
(cherry picked from commit d898d20)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants