[3.14] Use a more clear example for the PEP 758 what's new section (GH-135118) (#135119)

Use a more clear example for the PEP 758 what's new section (GH-135118)
(cherry picked from commit 1f51510444)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-06-04 11:28:59 +02:00 committed by GitHub
parent 5b3983b1a3
commit f5b438517d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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.