Skip to content

Conversation

@kovan
Copy link
Contributor

@kovan kovan commented Feb 8, 2026

Summary

Adds a brief note about extended slicing (s[i:j:k]) to the tutorial's string slicing section, with a link to the full definition in Common Sequence Operations.

This follows terryjreedy's suggestion on the issue:

If we add anything to 'this section', the best place might between the end of the [i:j] discussion and the start of the next, "Python strings cannot be changed ... immutable."

The note is placed exactly at that location — after the out-of-range slice examples and before the immutability discussion. It keeps the tutorial beginner-friendly by not explaining negative steps inline, while pointing readers to the full reference.

Test plan

  • make -C Doc check passes
  • make -C Doc html passes (no warnings)
  • Cross-reference to :ref:typesseq-common`` resolves correctly

🤖 Generated with Claude Code


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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@picnixz
Copy link
Member

picnixz commented Feb 10, 2026

While Terry suggested this addition I do not think it is worth it. The entire section is only about strings and this is the tutorial. I do not think we need to show it there.

@picnixz
Copy link
Member

picnixz commented Feb 10, 2026

cc @terryjreedy

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.

2 participants