Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b25eae commit 2c6afb9Copy full SHA for 2c6afb9
1 file changed
Doc/tutorial/errors.rst
@@ -549,9 +549,9 @@ caught like any other exception. ::
549
>>> try:
550
... f()
551
... except Exception as e:
552
- ... print(f'caught {type(e)}: e')
+ ... print(f'caught {type(e)}: {e}')
553
...
554
- caught <class 'ExceptionGroup'>: e
+ caught <class 'ExceptionGroup'>: there were problems (2 sub-exceptions)
555
>>>
556
557
By using ``except*`` instead of ``except``, we can selectively
0 commit comments