From 43afa5a4ce512ee345efe842d61d7f8767609aff Mon Sep 17 00:00:00 2001 From: Irit Katriel Date: Mon, 1 Mar 2021 23:39:08 +0000 Subject: [PATCH] PEP-654: tidy up leaf_generator example --- pep-0654.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pep-0654.rst b/pep-0654.rst index cd6c4b3e6ed..29c4e2ad571 100644 --- a/pep-0654.rst +++ b/pep-0654.rst @@ -414,14 +414,14 @@ We can then process the full tracebacks of the leaf exceptions: ... eg = e ... >>> for (i, (exc, tbs)) in enumerate(leaf_generator(eg)): - ... print(f"\n>>> Exception #{i+1}:") + ... print(f"\n=== Exception #{i+1}:") ... traceback.print_exception(exc) ... print(f"The complete traceback for Exception #{i+1}:") ... for tb in tbs: ... traceback.print_tb(tb) ... - >>> Exception #1: + === Exception #1: Traceback (most recent call last): File "", line 3, in g ValueError: 1 @@ -430,7 +430,7 @@ We can then process the full tracebacks of the leaf exceptions: File "", line 2, in f File "", line 3, in g - >>> Exception #2: + === Exception #2: Traceback (most recent call last): File "", line 3, in g ValueError: 2