Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lexical_analysis docs: Expand the text on _ #28903

Merged
merged 3 commits into from
Oct 13, 2021
Merged

Conversation

encukou
Copy link
Member

@encukou encukou commented Oct 12, 2021

The lexical analysis docs cover _ and should mention that it is now more special.

cc @brandtbucher; should I cc other patma people?


  • Mention that ``_` is a soft keyword

  • Expand the discussion into its own entry. (Even before this, text on _ was longer than the text on _*.)

  • Briefly note the other common convention for _: naming unused variables.

Also:
* Expand the discussion into its own entry. (Even before this,
  text on ``_`` was longet than the text on ``_*``.)

* Briefly note the other common convention for `_`: naming unused
  variables.
@encukou encukou changed the title lexical_analysis docs: Mention that _ is a soft keyword lexical_analysis docs: Expand the text on _ Oct 12, 2021
Copy link
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

LGTM.

Maybe Brandt has something else to add.

Copy link
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

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

Thanks! I have one (very minor) suggestion:

Doc/reference/lexical_analysis.rst Outdated Show resolved Hide resolved
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
@ambv
Copy link
Contributor

ambv commented Oct 13, 2021

Looks like we can't do @brandtbucher's suggested :keyword:`case` because Sphinx doesn't recognize the keyword. Since :keyword:`match` is recognized, I did something a little different then

@brandtbucher
Copy link
Member

Thanks @ambv!

@ambv ambv merged commit 3dee0cb into python:main Oct 13, 2021
@miss-islington
Copy link
Contributor

Thanks @encukou for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 13, 2021
Also:
* Expand the discussion into its own entry. (Even before this,
  text on ``_`` was longet than the text on ``_*``.)

* Briefly note the other common convention for `_`: naming unused
  variables.

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3dee0cb)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@bedevere-bot
Copy link

GH-28933 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Oct 13, 2021
ambv pushed a commit that referenced this pull request Oct 13, 2021
Also:
* Expand the discussion into its own entry. (Even before this,
  text on ``_`` was longet than the text on ``_*``.)

* Briefly note the other common convention for `_`: naming unused
  variables.

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3dee0cb)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@encukou
Copy link
Member Author

encukou commented Oct 19, 2021

Thank you!

@encukou encukou deleted the patma-lex-docs branch October 19, 2021 09:12
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 issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants