diff options
| author | Zackery Spytz <zspytz@gmail.com> | 2020-11-05 15:18:44 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-05 22:18:44 +0000 |
| commit | 91e93794d5dd1aa91fbe142099c2955e0c4c1660 (patch) | |
| tree | df0294cde2ffeabdb5fcbdc2107712fe1fd2b117 /Doc/whatsnew | |
| parent | dc42af8fd16b10127ce1fc93c13bc1bfd2674aa2 (diff) | |
| download | cpython-git-91e93794d5dd1aa91fbe142099c2955e0c4c1660.tar.gz | |
bpo-26389: Allow passing an exception object in the traceback module (GH-22610)
The format_exception(), format_exception_only(), and
print_exception() functions can now take an exception object as a positional-only argument.
Co-Authored-By: Matthias Bussonnier <bussonniermatthias@gmail.com>
Diffstat (limited to 'Doc/whatsnew')
| -rw-r--r-- | Doc/whatsnew/3.10.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index bac1a2e678..0ed7084ccd 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -232,6 +232,15 @@ retrieve the functions set by :func:`threading.settrace` and :func:`threading.setprofile` respectively. (Contributed by Mario Corchero in :issue:`42251`.) +traceback +--------- + +The :func:`~traceback.format_exception`, +:func:`~traceback.format_exception_only`, and +:func:`~traceback.print_exception` functions can now take an exception object +as a positional-only argument. +(Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.) + types ----- @@ -328,6 +337,15 @@ This section lists previously described changes and other bugfixes that may require changes to your code. +Changes in the Python API +------------------------- + +* The *etype* parameters of the :func:`~traceback.format_exception`, + :func:`~traceback.format_exception_only`, and + :func:`~traceback.print_exception` functions in the :mod:`traceback` module + have been renamed to *exc*. + (Contributed by Zackery Spytz and Matthias Bussonnier in :issue:`26389`.) + Build Changes ============= |
