Skip to content

gh-145694: Update tutorial indentation guidance for PyREPL auto-indent#145725

Open
mvanhorn wants to merge 1 commit into
python:mainfrom
mvanhorn:osc/145694-fix-tutorial-indentation
Open

gh-145694: Update tutorial indentation guidance for PyREPL auto-indent#145725
mvanhorn wants to merge 1 commit into
python:mainfrom
mvanhorn:osc/145694-fix-tutorial-indentation

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Mar 10, 2026

Copy link
Copy Markdown
Contributor

Fixes #145694

Summary

The tutorial page "An Informal Introduction to Python" stated that users must manually type tabs/spaces for indentation at the interactive prompt. Since Python 3.13, the default PyREPL auto-indents after compound statement headers like if and while, making this guidance misleading.

Updated the text to mention that the default REPL auto-indents, while noting the basic REPL (PYTHON_BASIC_REPL) and older versions still require manual indentation.

Test plan

  • Docs text is accurate for both default and basic REPL
  • References PYTHON_BASIC_REPL envvar correctly using :envvar: role

This contribution was developed with AI assistance (Claude Code).


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

…-indent

The tutorial stated users must manually type tabs/spaces at the interactive
prompt, which is no longer accurate since the PyREPL in Python 3.13+
auto-indents after compound statement headers. Updated to mention both
the default REPL behavior and the basic REPL fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 8, 2026
@github-actions github-actions Bot removed the stale Stale PR or inactive for long period of time. label Jun 9, 2026
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.

Docs: problem with page "3. An Informal Introduction to Python"

1 participant