Skip to content

Is this doc wording about raw bytes literal correct? #122701

@sobolevn

Description

@sobolevn

Link: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals

Снимок экрана 2024-08-05 в 21 38 55

Both string and bytes literals may optionally be prefixed with a letter 'r' or 'R'; such strings are called raw strings

I don't think that it is a correct wording. You cannot call rb'' as a "raw string", it is called "raw bytes". Or "raw bytes literal". Just like the docs docs in the next paragraph:

The 'rb' prefix of raw bytes literals has been added as a synonym of 'br'.

I propose to fix this by using this phrase:

Both string and bytes literals may optionally be prefixed with a letter 'r' or 'R'; such objects are called raw strings and raw bytes respectively.

Linked PRs

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dir

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions