-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-118181: Fix parameter markup in AST docs #124473
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
Conversation
Doc/library/ast.rst
Outdated
@@ -267,7 +267,7 @@ Literals | |||
|
|||
.. class:: Constant(value) | |||
|
|||
A constant value. The ``value`` attribute of the ``Constant`` literal contains the | |||
A constant value. The *value* attribute of the ``Constant`` literal contains the |
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.
Looking at this now, I'm not sure it's actually right (sorry for the trouble!). We mark up parameters with italics, but attributes with double backticks. These names are both parameters to the constructor and attributes on the resulting object, but the attribute use case is the most important, as it's more common to inspect an AST than to create AST nodes.
I'll ask on the docs Discord for more opinions.
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.
Based on the discussion on Discord, I changed the (few) cases that used *value*
to use backticks instead :)
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.
Thanks, Tomas! I would like to believe that I didn't miss anything while reviewing it.
Thanks @tomasr8 for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
(cherry picked from commit 09aebb1) Co-authored-by: Tomas R <[email protected]>
Sorry, @tomasr8 and @JelleZijlstra, I could not cleanly backport this to
|
GH-124600 is a backport of this pull request to the 3.13 branch. |
Thanks @tomasr8! Are you interested in doing the 3.12 backport? I guess it failed because I added some AST nodes in 3.13. |
Sure! I can have a look later today or tomorrow if it's ok? :) |
Thanks, there's no hurry! |
GH-124705 is a backport of this pull request to the 3.12 branch. |
There were quite a few so I hope I got all of them 😅
Also, this is a minor docs fix so I'm guessing no news entry is required?
cc @Eclips4 :)
📚 Documentation preview 📚: https://cpython-previews--124473.org.readthedocs.build/