From 33c0ba0ead4ec41fdfc3d520c18e5ab485f52417 Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Mon, 13 Jan 2025 00:12:11 -0500 Subject: [PATCH] =?utf8?q?[3.13]=20gh-128409:=20Document=20that=20pdb.post?= =?utf8?q?=5Fmortem()=20accepts=20exceptions=20=E2=80=A6=20(#128767)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * [3.13] gh-128409: Document that pdb.post_mortem() accepts exceptions (GH-128410) (cherry picked from commit 1b39b502d33c68f52fd775c4e6c2174baddd40bd) Co-authored-by: Adam Johnson Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/library/pdb.rst | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index 9478d7b7d557..50cafc1e2d82 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -173,13 +173,15 @@ slightly different way: :func:`set_trace` will enter the debugger immediately, rather than on the next line of code to be executed. -.. function:: post_mortem(traceback=None) +.. function:: post_mortem(t=None) - Enter post-mortem debugging of the given *traceback* object. If no - *traceback* is given, it uses the one of the exception that is currently - being handled (an exception must be being handled if the default is to be - used). + Enter post-mortem debugging of the given exception or + :ref:`traceback object `. If no value is given, it uses + the exception that is currently being handled, or raises ``ValueError`` if + there isn’t one. + .. versionchanged:: 3.13 + Support for exception objects was added. .. function:: pm() -- 2.47.3