Skip to content

gh-113418: Correct raw string literal documentation - #162695

Open
jaypratpsinghbhadoria wants to merge 1 commit into
python:mainfrom
jaypratpsinghbhadoria:docs-raw-string-literal-wording
Open

jaypratpsinghbhadoria wants to merge 1 commit into
python:mainfrom
jaypratpsinghbhadoria:docs-raw-string-literal-wording

Conversation

@jaypratpsinghbhadoria

@jaypratpsinghbhadoria jaypratpsinghbhadoria commented Nov 26, 2026 •

Copy link
Copy Markdown

Fixes #113418.

The FAQ said a quote could be passed on by escaping it with a backslash in a
raw string. In fact the backslash is retained, so r'\'' evaluates to the two
characters \ and '. This updates the FAQ wording, explains why no syntax can
represent a single trailing backslash, and makes the lexical reference state the
same rule explicitly.

Documentation-only change.

@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

Signed-off-by: Jay pratap singh bhadoria <jaypratpsinghbhadoria@gmail.com>
@jaypratpsinghbhadoria
jaypratpsinghbhadoria force-pushed the docs-raw-string-literal-wording branch from 9d96525 to 61cb271 Compare November 26, 2026 16:34
@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36193739 | 📁 Comparing 61cb271 against main (9fe52e9)

  🔍 Preview build  

2 files changed
± faq/design.html
± reference/lexical_analysis.html

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.

Documentation regarding raw string literals and backslashes is incorrect / misleading

1 participant