PEP 678: Enriching Exceptions with Notes

I apologize if I haven’t understood what you suggested. Could you give an example ?

How can I update the exception in-place to modify the way it will be rendered when:

  • I don’t control the original exception (can be any custom user exception)
  • I don’t control the user code in which the exception is propagated