https://github.com/python/cpython/commit/2c6afb935ad588f32cb969345d0345e45d3a766e
commit: 2c6afb935ad588f32cb969345d0345e45d3a766e
branch: main
author: Bartosz Grabowski <[email protected]>
committer: kumaraditya303 <[email protected]>
date: 2026-03-18T16:49:15Z
summary:

docs: fix f-string in ExceptionGroup example (#146108)

files:
M Doc/tutorial/errors.rst

diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index ae21dfdbf0ac44..3c6edf2c4793ab 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -549,9 +549,9 @@ caught like any other exception. ::
    >>> try:
    ...     f()
    ... except Exception as e:
-   ...     print(f'caught {type(e)}: e')
+   ...     print(f'caught {type(e)}: {e}')
    ...
-   caught <class 'ExceptionGroup'>: e
+   caught <class 'ExceptionGroup'>: there were problems (2 sub-exceptions)
    >>>
 
 By using ``except*`` instead of ``except``, we can selectively

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to