Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PEP 678: link cross-reference
  • Loading branch information
Zac-HD committed Mar 2, 2022
commit 24912782305b6447f77ef1fed50b2b2b6bc618c8
5 changes: 4 additions & 1 deletion pep-0678.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ therefore propose to add:

Example usage
-------------
::

>>> try:
... raise TypeError('bad type')
Expand Down Expand Up @@ -198,6 +199,8 @@ implements ``.add_note()`` and ``__notes__``.
Rejected Ideas
==============

.. _print_idea:

Use ``print()`` (or ``logging``, etc.)
--------------------------------------
Reporting explanatory or contextual information about an error by printing or
Expand Down Expand Up @@ -323,7 +326,7 @@ Don't attach notes to ``Exception``\ s, just store them in ``ExceptionGroup``\ s
--------------------------------------------------------------------------------
The initial motivation for this PEP was to associate a note with each error
in an ``ExceptionGroup``. At the cost of a remarkably awkward API and the
cross-referencing problem discussed under "use ``print()``" above, this
cross-referencing problem discussed `above <print_idea>`__, this
use-case could be supported by storing notes on the ``ExceptionGroup``
instance instead of on each exception it contains.

Expand Down