From e6b2b69f3b64efe70a21cd134c7d5eec0c4c8f79 Mon Sep 17 00:00:00 2001 From: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com> Date: Wed, 18 Mar 2026 17:49:15 +0100 Subject: [PATCH] docs: fix f-string in ExceptionGroup example (GH-146108) (cherry picked from commit 2c6afb935ad588f32cb969345d0345e45d3a766e) Co-authored-by: Bartosz Grabowski <58475557+bartosz-grabowski@users.noreply.github.com> --- Doc/tutorial/errors.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 : e + caught : there were problems (2 sub-exceptions) >>> By using ``except*`` instead of ``except``, we can selectively