File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -342,15 +342,16 @@ For example the following expressions are now valid:
342
342
.. code-block :: python
343
343
344
344
try :
345
- release_new_sleep_token_album ()
346
- except AlbumNotFound, SongsTooGoodToBeReleased :
347
- print (" Sorry, no new album this year ." )
345
+ connect_to_server ()
346
+ except TimeoutError , ConnectionRefusedError :
347
+ print (" Network issue encountered ." )
348
348
349
349
# The same applies to except* (for exception groups):
350
+
350
351
try :
351
- release_new_sleep_token_album ()
352
- except * AlbumNotFound, SongsTooGoodToBeReleased :
353
- print (" Sorry, no new album this year ." )
352
+ connect_to_server ()
353
+ except * TimeoutError , ConnectionRefusedError :
354
+ print (" Network issue encountered ." )
354
355
355
356
Check :pep: `758 ` for more details.
356
357
You can’t perform that action at this time.
0 commit comments