Skip to content

gh-145591: Move slicing note to subscription methods section#145606

Open
Towaiji wants to merge 1 commit intopython:mainfrom
Towaiji:gh-145591-slicing-note-move
Open

gh-145591: Move slicing note to subscription methods section#145606
Towaiji wants to merge 1 commit intopython:mainfrom
Towaiji:gh-145591-slicing-note-move

Conversation

@Towaiji
Copy link

@Towaiji Towaiji commented Mar 6, 2026

This PR moves the slicing note out of the object.__length_hint__ section and places it with the subscription protocol under object.__getitem__.

That keeps the slicing translation example (a[1:2] = b -> a[slice(1, 2, None)] = b) next to the relevant special methods (__getitem__, __setitem__, __delitem__).

Issue: #145591


📚 Documentation preview 📚: https://cpython-previews--145606.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Mar 6, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant