Skip to content

gh-127833: lexical analysis: Improve section on Names - #131474

Merged
encukou merged 5 commits into
python:mainfrom
encukou:lex-analysis-names
May 21, 2025
Merged

gh-127833: lexical analysis: Improve section on Names#131474
encukou merged 5 commits into
python:mainfrom
encukou:lex-analysis-names

Conversation

@encukou

@encukouencukou commented Mar 19, 2025

Copy link
Copy Markdown
Member

Use consistent terminology: "names" are "identifiers", "keywords", and "soft keywords".
Start with the simple case (ASCII), then get more and more technical.
Define NAME in the formal lexical grammar.
Exclude keywords in the identifier definition.


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

Comment threadDoc/reference/lexical_analysis.rst Outdated
Comment threadDoc/reference/lexical_analysis.rst Outdated
Comment threadDoc/reference/lexical_analysis.rst Outdated
Comment threadDoc/reference/lexical_analysis.rst Outdated
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
@encukouencukou added the needs backport to 3.14 bugs and security fixes label May 7, 2025
@terryjreedy

Copy link
Copy Markdown
Member

I like the re-arrangement and separation of identifier and keyword.

@encukou

Copy link
Copy Markdown
MemberAuthor

Thanks for the reviews!
I plan to merge on Wednesday if there are no objections.

@encukou
encukou merged commit c7364f7 into python:mainMay 21, 2025
@github-project-automationgithub-project-automationBot moved this from Todo to Done in Docs PRsMay 21, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@encukou
encukou deleted the lex-analysis-names branch May 21, 2025 14:01
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 21, 2025
…-131474)
(cherry picked from commit c7364f7)
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>
@bedevere-app

Copy link
Copy Markdown

GH-134423 is a backport of this pull request to the 3.14 branch.

@bedevere-appbedevere-appBot removed the needs backport to 3.14 bugs and security fixes label May 21, 2025
@miss-islington-app

Copy link
Copy Markdown

Sorry @encukou, I had trouble completing the backport.
Please retry by removing and re-adding the "needs backport to 3.14" label.
Please backport backport using cherry_picker on the command line.

cherry_picker c7364f79b2fb01c251e22115875a46a2ec134dcd 3.14

hugovk pushed a commit that referenced this pull request May 26, 2025
…) (#134423)
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>
lkollar pushed a commit to lkollar/cpython that referenced this pull request May 26, 2025
…-131474)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
…-131474)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
…-131474)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
gostak-dd pushed a commit to gostak-dd/cpython that referenced this pull request Jun 2, 2026
…-131474)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docsDocumentation in the Doc dirskip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

@encukou@terryjreedy@StanFromIreland