Skip to content

gh-162603: Clarify SyntaxError message and string representation - #162670

Open
Akay-74 wants to merge 1 commit into
python:mainfrom
Akay-74:docs-syntaxerror-162603
Open

Akay-74 wants to merge 1 commit into
python:mainfrom
Akay-74:docs-syntaxerror-162603

Conversation

@Akay-74

@Akay-74 Akay-74 commented Nov 26, 2026 •

Copy link
Copy Markdown

Document SyntaxError.msg and clarify that the string representation of a SyntaxError can include the filename or line number. No runtime behavior changes.

The full Sphinx HTML build passed, and the rendered page includes the new msg entry. Five checks on CPython 3.12.14 covered exceptions with and without location details.

Fixes #162603.

@python-cla-bot

python-cla-bot Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36183219 | 📁 Comparing 70f29f8 against main (b0b0005)

  🔍 Preview build  

1 file changed
± builtins/exceptions.html

@picnixz

picnixz commented Nov 26, 2026

Copy link
Copy Markdown
Member

Draft until the CLA is signed by a human and not an agent.

@picnixz
picnixz marked this pull request as draft November 26, 2026 12:39
@picnixz
picnixz marked this pull request as ready for review November 26, 2026 18:09
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: str() of a SyntaxError is not only the error message, and SyntaxError.msg is not documented

2 participants