gh-118181: Fix parameter markup in AST docs#124473
Conversation
| .. 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.
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.
Based on the discussion on Discord, I changed the (few) cases that used *value* to use backticks instead :)
Eclips4
left a comment
There was a problem hiding this comment.
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/