Skip to content

Commit 0a12aff

Browse files
adamchainzStanFromIreland
authored andcommitted
[3.13] gh-128409: Document that pdb.post_mortem() accepts exceptions (GH-128410)
(cherry picked from commit 1b39b50) Co-authored-by: Adam Johnson <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]>
1 parent 6116e1b commit 0a12aff

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Doc/library/pdb.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,16 @@ slightly different way:
173173
:func:`set_trace` will enter the debugger immediately, rather than
174174
on the next line of code to be executed.
175175

176-
.. function:: post_mortem(traceback=None)
177176

178-
Enter post-mortem debugging of the given *traceback* object. If no
179-
*traceback* is given, it uses the one of the exception that is currently
180-
being handled (an exception must be being handled if the default is to be
181-
used).
177+
.. function:: post_mortem(t=None)
182178

179+
Enter post-mortem debugging of the given exception or
180+
:ref:`traceback object <traceback-objects>`. If no value is given, it uses
181+
the exception that is currently being handled, or raises ``ValueError`` if
182+
there isn’t one.
183+
184+
.. versionchanged:: 3.13
185+
Support for exception objects was added.
183186

184187
.. function:: pm()
185188

0 commit comments

Comments
 (0)