Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.4k
gh-135676: Simplify docs on lexing names#140464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
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>
willingc left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Outstanding document@encukou. I had one small suggestion to be a bit more explicit on the normalization example with number.
| This means that, for example, some typographic variants of characters are | ||
| converted to their "basic" form, for example:: | ||
| >>> nᵘₘᵇₑʳ = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
It would be helpful to add an explicit comment that the normalized form ofnᵘₘᵇₑʳisnumber.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Does this look good?
encukou commentedNov 5, 2025
There was an insightful conversation in#140269. I'll update this PR to make things even clearer. |
Uh oh!
There was an error while loading.Please reload this page.
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:
id_start/id_continuesets (referred to in previous sections as “letter-like” and “number-like” characters, with a link to the details)This also means we don't need
xid_start/xid_continueto define the behaviour :)📚 Documentation preview 📚:https://cpython-previews--140464.org.readthedocs.build/