Skip to content

Conversation

encukou
Copy link
Member

@encukou encukou commented Feb 26, 2025

  • Add hand-written docs for non-OP tokens

  • Make the automation (generate_token.py) check that the hand-written docs are present, and only generate docs for the OP tokens

  • Switch to list-table for the OP tokens, to make their docs more compact

  • Add ENDMARKER to the grammar docs where it appears (toplevel components)

  • Add forgotten versionchanged entry for EXCLAMATION

  • Remove docs for NT_OFFSET


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

@encukou
Copy link
Member Author

encukou commented Feb 26, 2025

@encukou
Copy link
Member Author

encukou commented Feb 26, 2025

@lysnikolaou, does this look reasonable to you?

Copy link
Member

@lysnikolaou lysnikolaou left a comment

Choose a reason for hiding this comment

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

This looks like a good improvement to me! Thanks @encukou!

I've left some inline comments regarding some specifics in the docs.

Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Lysandros Nikolaou <[email protected]>
@encukou
Copy link
Member Author

encukou commented Feb 27, 2025

Thank you for the reviews! I addressed some; I'll continue next week.

Comment on lines +22 to +25
Note that a token's value may depend on tokenizer options. For example, a
``"+"`` token may be reported as either :data:`PLUS` or :data:`OP`, or
a ``"match"`` token may be either :data:`NAME` or :data:`SOFT_KEYWORD`.

Copy link
Member Author

@encukou encukou Mar 5, 2025

Choose a reason for hiding this comment

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

I added this note to clarify the “fuzziness” of these categories.

@encukou encukou merged commit 4bced29 into python:main Mar 19, 2025
39 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Mar 19, 2025
@encukou encukou deleted the token-docs branch March 19, 2025 15:42
@encukou encukou added the needs backport to 3.13 bugs and security fixes label Mar 19, 2025
@miss-islington-app
Copy link

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

@miss-islington-app
Copy link

Sorry, @encukou, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 4bced29a74c4dbcf310a47e8202292aaa39b617b 3.13

@bedevere-app
Copy link

bedevere-app bot commented Mar 19, 2025

GH-131465 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Mar 19, 2025
encukou added a commit to encukou/cpython that referenced this pull request Mar 19, 2025
…0588)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Lysandros Nikolaou <[email protected]>
(cherry picked from commit 4bced29)
encukou added a commit to encukou/cpython that referenced this pull request Mar 19, 2025
…onGH-130588)

(cherry picked from commit 4bced29)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Lysandros Nikolaou <[email protected]>
encukou added a commit that referenced this pull request Mar 24, 2025
…GH-131465)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Lysandros Nikolaou <[email protected]>
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…0588)

Co-authored-by: Blaise Pabon <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Lysandros Nikolaou <[email protected]>
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.

4 participants