Skip to content

[3.14] gh-135676: Simplify docs on lexing names (GH-140464)#142015

Merged
encukou merged 1 commit intopython:3.14from
StanFromIreland:backport-2ff8608-3.14
Dec 3, 2025
Merged

[3.14] gh-135676: Simplify docs on lexing names (GH-140464)#142015
encukou merged 1 commit intopython:3.14from
StanFromIreland:backport-2ff8608-3.14

Conversation

@StanFromIreland
Copy link
Member

@StanFromIreland StanFromIreland commented Nov 27, 2025

This simplifies the Lexical Analysis section on Names (but keeps it technically correct) by putting all the info about non-ASCII characters in a separate (and very technical) section.

It uses a mental model where the parser doesn't handle Unicode complexity “immediately”, but:

  • parses any non-ASCII character (outside strings/comments) as part of a name, since these can't (yet) be e.g. operators
  • normalizes the name
  • validates the name, using the xid_start/xid_continue sets

(cherry picked from commit 2ff8608)


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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants