Skip to content

Commit 41886dd

Browse files
authored
PEP 654: Tidy up leaf_generator example (#1854)
1 parent 274670b commit 41886dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pep-0654.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,14 +414,14 @@ We can then process the full tracebacks of the leaf exceptions:
414414
... eg = e
415415
...
416416
>>> for (i, (exc, tbs)) in enumerate(leaf_generator(eg)):
417-
... print(f"\n>>> Exception #{i+1}:")
417+
... print(f"\n=== Exception #{i+1}:")
418418
... traceback.print_exception(exc)
419419
... print(f"The complete traceback for Exception #{i+1}:")
420420
... for tb in tbs:
421421
... traceback.print_tb(tb)
422422
...
423423
424-
>>> Exception #1:
424+
=== Exception #1:
425425
Traceback (most recent call last):
426426
File "<stdin>", line 3, in g
427427
ValueError: 1
@@ -430,7 +430,7 @@ We can then process the full tracebacks of the leaf exceptions:
430430
File "<stdin>", line 2, in f
431431
File "<stdin>", line 3, in g
432432
433-
>>> Exception #2:
433+
=== Exception #2:
434434
Traceback (most recent call last):
435435
File "<stdin>", line 3, in g
436436
ValueError: 2

0 commit comments

Comments
 (0)