-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Docs: Add 'as, match statement' to the index #99001
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
Conversation
|
Thanks for fixing! Maybe the subject of another PR, but I find the "keyword, [1], [2], [3]" phrasing a little confusing: it feels like the keyword link is in a different category than the number links. One possible fix is if we have more than one keyword link, the word "keyword" shouldn't be linked, e.g. "keyword, [1], [2], [3], [4]". |
|
That would be something to report to Sphinx. |
|
Thanks @hugovk for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
(cherry picked from commit 26720ff) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
GH-99037 is a backport of this pull request to the 3.11 branch. |
(cherry picked from commit 26720ff) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
GH-99038 is a backport of this pull request to the 3.10 branch. |
(cherry picked from commit 26720ff) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit 26720ff) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
match as ...Fix for issue identified on Discourse:
Before
For "as" in the index, we have:
https://docs.python.org/3.12/genindex-A.html
There's no "match statement" there.
This is the index entry for the
importstatement:.. index:: ! statement: with keyword: as single: as; with statement single: , (comma); with statement single: : (colon); compound statementThis is the index entry for the
matchstatement:.. index:: ! statement: match ! keyword: case ! single: pattern matching keyword: if keyword: as pair: match; case single: : (colon); compound statementAfter
So let's add
single: as; match statement:try ... except as ...I will note that those keyword links are:
withstatementmatchstatementtrystatementimportstatementTo be more explicit, we could also add "try statement" to complete the quartet? It's already covered by "except clause" though.