Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-95913: Fix and copyedit New Features section of 3.11 What's New #95915

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

Merged
merged 5 commits into from
Sep 19, 2022
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
Prev Previous commit
Next Next commit
3.11 Whatsnew: Copyedit section describing exception notes
  • Loading branch information
CAM-Gerlach committed Aug 14, 2022
commit 548e6c78b8c2ad44f9f8d4d0ee514e4f72b13c6a
15 changes: 8 additions & 7 deletions 15 Doc/whatsnew/3.11.rst
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,14 @@ Irit Katriel, Yury Selivanov and Guido van Rossum.)


PEP 678: Exceptions can be enriched with notes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The :meth:`add_note` method was added to :exc:`BaseException`. It can be
used to enrich exceptions with context information which is not available
at the time when the exception is raised. The notes added appear in the
default traceback. See :pep:`678` for more details. (Contributed by
Irit Katriel in :issue:`45607`.)
----------------------------------------------

The :meth:`~BaseException.add_note` method is added to :exc:`BaseException`.
It can be used to enrich exceptions with context information
that is not available at the time when the exception is raised.
The added notes appear in the default traceback.
See :pep:`678` for more details.
(Contributed by Irit Katriel in :issue:`45607`.)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(Contributed by Irit Katriel in :issue:`45607`.)
(Contributed by Irit Katriel in :gh:`89770`.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about this, but I didn't end up updating these, since the BPO issue was canonical at the time the work was done, and the links redirect to the up to date GH issue. Is there any guidance on whether old :issue: refs should be manually converted, or left as-is? I couldn't find any in the devguide; if not, it might be better to make this a separate issue/discussion and be done consistently throughout.

Copy link
Member

Choose a reason for hiding this comment

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

IMO it's best to avoid links to redirects, but it's not a big deal.

Copy link
Member Author

@CAM-Gerlach CAM-Gerlach Sep 19, 2022

Choose a reason for hiding this comment

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

Yup, if people agree I'm happy to go through and convert them; I just think its best to do it in a separate PR after these more important ones are all merged, so it can be decided there, its consistent and we don't hold up the rest of the changes since we're on the clock here.



.. _new-feat-related-type-hints-311:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.