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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/pdb.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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


.. index::
pair: .pdbrc; file
Expand Down
Loading