Repository navigation
Fix quotes in string representation of a tutorial example - #163063
Merged
Merged
Conversation
Python shows list items with single quotes, so the output of the rgb/rgba example in the "Lists" section of the tutorial did not match what the interpreter prints.
|
📖 2 files modified Preview · build overview · cpython-previews · built Dec. 3, 2026, 9:53 a.m. UTC |
aliysnm
force-pushed
the
docs-tutorial-list-repr-quotes
branch
from
December 3, 2026 09:50
0c814da to
063ef89
Compare
picnixz
approved these changes
Dec 3, 2026
picnixz
enabled auto-merge (squash)
December 3, 2026 13:05
picnixz
disabled auto-merge
December 3, 2026 13:05
|
GH-163083 is a backport of this pull request to the 3.15 branch. |
|
GH-163084 is a backport of this pull request to the 3.14 branch. |
picnixz
pushed a commit
that referenced
this pull request
Dec 3, 2026
picnixz
pushed a commit
that referenced
this pull request
Dec 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the "Lists" section of the tutorial, the example output uses double quotes, but the interpreter prints a list's items with single quotes:
This is a small detail, but the tutorial is aimed at beginners, who may copy the session and wonder why their output differs. The fix changes only the three output lines. The input lines keep their double quotes.
I found this the same way as #163060: by running the
>>>examples in literal blocks, which the doctest builder doesn't check. I used an AI assistant to write that script and to prepare this PR. After the fix, the only remaining failure in this file is the intentionalSyntaxErrorexample.