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 ec8e33b commit daa4106Copy full SHA for daa4106
1 file changed
Doc/tutorial/errors.rst
@@ -545,9 +545,9 @@ caught like any other exception. ::
545
>>> try:
546
... f()
547
... except Exception as e:
548
- ... print(f'caught {type(e)}: e')
+ ... print(f'caught {type(e)}: {e}')
549
...
550
- caught <class 'ExceptionGroup'>: e
+ caught <class 'ExceptionGroup'>: there were problems (2 sub-exceptions)
551
>>>
552
553
By using ``except*`` instead of ``except``, we can selectively
0 commit comments