-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' #95937
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
Changes from 1 commit
232d87b
6953eba
87d77c4
e18ee3c
4b13c09
dd28613
c64a047
602fdc9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -176,14 +176,33 @@ The :option:`-X` ``no_debug_ranges`` option and the environment variable | |||||
See :pep:`657` for more details. (Contributed by Pablo Galindo, Batuhan Taskaya | ||||||
and Ammar Askar in :issue:`43950`.) | ||||||
|
||||||
Exception Groups and ``except*`` (PEP 654) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we be consistent about PEP numbers in Feature section titles? Right now the type hint PEP sections are in the form IMO, it would seem to make sense to either elide the PEP numbers in the New Features section titles (as I do for the section below in #95914 , since they don't add much value for most users and are already mentioned/linked in the section body and Summary), or consistently use them with the same format between these two sections (I can take care of the others in my separate PRs, but it would be nice to be consistent here). |
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
iritkatriel marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
:pep:`654` introduces language features that enable a program | ||||||
to raise and handle multiple unrelated exceptions simultaneously. | ||||||
The builtin types :exc:`ExceptionGroup` and :exc:`BaseExceptionGroup` | ||||||
make it possible to group exceptions and raise them together. | ||||||
The new ``except*`` syntax generalizes ``except`` to match subgroups | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In line with our policy that PEPs are historic documents, not documentation, maybe this should deep link to the part under https://docs.python.org/3.11/reference/compound_stmts.html#try where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, the keyword appears to be linked precisely, both judging from its position in the source on both 3.12 and 3.11, and the fact that the index entry correctly links to it. But maybe a However, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think a link to the top of the section is fine.
iritkatriel marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
of exception groups. | ||||||
|
||||||
See :pep:`654` for more details. | ||||||
|
||||||
(Contributed by Irit Katriel in :issue:`45292`. PEP written by | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be done (if at all) in a separate PR where the summary reference to the same issue is updated as well. I say "if at all" because this is not historically accurate - I did the work under a bpo issue. Are you going to change all references to bpo issues in the docs to the gh issues they were mapped to? |
||||||
Irit Katriel, Yury Selivanov and Guido van Rossum.) | ||||||
|
||||||
Exceptions can be enriched with notes (PEP 678) | ||||||
iritkatriel marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|
||||||
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`.) | ||||||
default traceback. | ||||||
|
||||||
See :pep:`678` for more details. | ||||||
|
||||||
(Contributed by Irit Katriel in :issue:`45607`. PEP written by | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
Zac Hatfield-Dodds.) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we make these changes in #95915 instead, since that PR is closer to the scope of the change (copyediting existing entries vs. adding a specific new one), and it will cause a significant merge conflict for whichever PR gets merged second otherwise? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, I'll remove it and you can put it there. |
||||||
|
||||||
|
||||||
.. _new-feat-related-type-hints-311: | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.