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

gh-119580: Improve version added section for convenience variable #119583

Merged
merged 4 commits into from
May 27, 2024

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented May 26, 2024

The version added section is not clear about what is "added" because there are a lot of content above. Clarify it by explicitly write the feature.


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

@gaogaotiantian gaogaotiantian added skip news needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels May 26, 2024
@bedevere-app bedevere-app bot added docs Documentation in the Doc dir awaiting review labels May 26, 2024
@@ -288,7 +288,7 @@ There are three preset *convenience variables*:
* ``$_retval``: the return value if the frame is returning
* ``$_exception``: the exception if the frame is raising an exception

.. versionadded:: 3.12
.. versionadded:: 3.12 *convenience variable*
Copy link
Member

Choose a reason for hiding this comment

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

I think this is how we'd normally do this kind of thing:

Suggested change
.. versionadded:: 3.12 *convenience variable*
.. versionadded:: 3.12
Added the three convenience variables

E.g. see

.. versionadded:: 3.6.2
Added :data:`NoReturn`.
.. versionadded:: 3.11
Added :data:`Never`.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay I copied the format from enum.rst where they do thing differently...

Copy link
Member Author

Choose a reason for hiding this comment

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

Also this is what confused the user - we did not only add the three convenience variables, we added the convenience variable feature, together with three pre-defined convenience variables.

Copy link
Member

Choose a reason for hiding this comment

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

Okay I copied the format from enum.rst where they do thing differently...

Oh, fair enough!

Also this is what confused the user - we did not only add the three convenience variables, we added the convenience variable feature, together with three pre-defined convenience variables.

I see. I think your proposed text is maybe slightly too terse in that case; I still misread it as a non-pdb expert

Doc/library/pdb.rst Outdated Show resolved Hide resolved
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks!

@AlexWaygood AlexWaygood merged commit 3dfa364 into python:main May 27, 2024
25 checks passed
@miss-islington-app
Copy link

Thanks @gaogaotiantian for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2024
…le (pythonGH-119583)

(cherry picked from commit 3dfa364)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 27, 2024
…le (pythonGH-119583)

(cherry picked from commit 3dfa364)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
@bedevere-app
Copy link

bedevere-app bot commented May 27, 2024

GH-119624 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 May 27, 2024
@bedevere-app
Copy link

bedevere-app bot commented May 27, 2024

GH-119625 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label May 27, 2024
AlexWaygood pushed a commit that referenced this pull request May 27, 2024
…ble (GH-119583) (#119625)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
AlexWaygood pushed a commit that referenced this pull request May 27, 2024
…ble (GH-119583) (#119624)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
@gaogaotiantian gaogaotiantian deleted the pdb-convenience-var-docs branch May 30, 2024 03:40
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants