https://github.com/python/cpython/commit/1f515104441898111c20aca5a7bbda1d11b15d36
commit: 1f515104441898111c20aca5a7bbda1d11b15d36
branch: main
author: Pablo Galindo Salgado <pablog...@gmail.com>
committer: pablogsal <pablog...@gmail.com>
date: 2025-06-04T09:23:08Z
summary:

Use a more clear example for the PEP 758 what's new section (#135118)

files:
M Doc/whatsnew/3.14.rst

diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index 27dfc75c90fbe9..45e68aea5fb9a2 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -342,15 +342,16 @@ For example the following expressions are now valid:
 .. code-block:: python
 
    try:
-       release_new_sleep_token_album()
-   except AlbumNotFound, SongsTooGoodToBeReleased:
-       print("Sorry, no new album this year.")
+       connect_to_server()
+   except TimeoutError, ConnectionRefusedError:
+       print("Network issue encountered.")
 
     # The same applies to except* (for exception groups):
+
    try:
-       release_new_sleep_token_album()
-   except* AlbumNotFound, SongsTooGoodToBeReleased:
-       print("Sorry, no new album this year.")
+       connect_to_server()
+   except* TimeoutError, ConnectionRefusedError:
+       print("Network issue encountered.")
 
 Check :pep:`758` for more details.
 

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to