Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Merged
encukou merged 1 commit intopython:3.14python/cpython:3.14from
StanFromIreland:backport-2ff8608-3.14StanFromIreland/cpython:backport-2ff8608-3.14Copy head branch name to clipboard
Dec 3, 2025
Merged

[3.14] gh-135676: Simplify docs on lexing names (GH-140464)#142015
encukou merged 1 commit intopython:3.14python/cpython:3.14from
StanFromIreland:backport-2ff8608-3.14StanFromIreland/cpython:backport-2ff8608-3.14Copy head branch name to clipboard

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/

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)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Micha Albert <info@micha.zone>
Co-authored-by: KeithTheEE <kmurrayis@gmail.com>
Comment on lines +593 to +594
.. _PropList.txt: https://www.unicode.org/Public/16.0.0/ucd/PropList.txt
.. _DerivedCoreProperties.txt: https://www.unicode.org/Public/16.0.0/ucd/DerivedCoreProperties.txt
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(un-)updated these to UCD 16.0.0.

@encukou
Copy link
Member

encukou commented Dec 3, 2025

Thank you!

@encukou encukou merged commit 79245a4 into python:3.14 Dec 3, 2025
36 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Dec 3, 2025
@StanFromIreland StanFromIreland deleted the backport-2ff8608-3.14 branch December 3, 2025 13:20
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.