[issue43377] _PyErr_Display should be available in the CPython-specific API

Petr Viktorin report at bugs.python.org
Wed Jul 28 04:24:50 EDT 2021


Petr Viktorin <encukou at gmail.com> added the comment:

PyErr_Display (without underscore) is already exposed.
This issue is about adding a variant with an additional output file argument.

The function formats an exception "just as Python would". The exact output will naturally be different between versions, but the function is still useful.

I'm also not sold on the "the arguments it may take" restriction:
- exceptions generally carry all of their context around
- even if they don't in the future, we'll always need a function that takes "just" an exception, for cases where some additional context isn't available

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43377>
_______________________________________


More information about the Python-bugs-list mailing list