Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-141984: Reword and reorganize Subscription (and Slicing) docs#141985
gh-141984: Reword and reorganize Subscription (and Slicing) docs#141985encukou merged 23 commits intopython:mainfrom
Conversation
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
encukou left a comment
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.
Thank you for going through this!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
StanFromIreland left a comment
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.
Just a few little things, overall looks very good!
Uh oh!
There was an error while loading.Please reload this page.
Doc/reference/expressions.rst Outdated
| subscription: `primary` '[' `subscript` ']' | ||
| subscript: `slice` | `tuple_slices` | ||
| tuple_slices: ','.(`slice` | `starred_expression`)+ [','] | ||
| slice: `proper_slice` | `assignment_expression` |
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 this grammar, if one doessomething[0],0 is anint and is aslice, but that contradicts with your glossary entry, that states it must be a "an object of typeslice"?
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.
That's a good point. I've considered the terms and the rules separate namespaces, but i agree it can be confusing.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
StanFromIreland left a comment
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 read through most during your unicode shenanigans ;-), a few small things but otherwise LGTM.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
StanFromIreland left a comment
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.
With that, LGMT
e423e0c intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
pythonGH-141985)(cherry picked from commite423e0c)Co-authored-by: Petr Viktorin <encukou@gmail.com>Co-authored-by: Blaise Pabon <blaise@gmail.com>Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
GH-144476 is a backport of this pull request to the3.14 branch. |
Uh oh!
There was an error while loading.Please reload this page.
This merges theSubscriptions andSlicings sections in the language reference. From the parser's point of view, slicing is a special case of subscription, and it makes sense to document it that way too.
The PR also touches Data model documentation: I've tried to move details of the runtime behaviour there, and to de-duplicate (and cross-link) as needed.
Similar for the
sliceattribute docs.Todo:
📚 Documentation preview 📚:https://cpython-previews--141985.org.readthedocs.build/