Skip to content

Commit 33c0ba0

Browse files
gaogaotiantianadamchainzStanFromIreland
authored
[3.13] gh-128409: Document that pdb.post_mortem() accepts exceptions … (#128767)
* [3.13] gh-128409: Document that pdb.post_mortem() accepts exceptions (GH-128410) (cherry picked from commit 1b39b50) Co-authored-by: Adam Johnson <me@adamj.eu> Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
1 parent 6116e1b commit 33c0ba0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

Doc/library/pdb.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,13 +173,15 @@ 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)
176+
.. function:: post_mortem(t=None)
177177

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).
178+
Enter post-mortem debugging of the given exception or
179+
:ref:`traceback object <traceback-objects>`. If no value is given, it uses
180+
the exception that is currently being handled, or raises ``ValueError`` if
181+
there isn’t one.
182182

183+
.. versionchanged:: 3.13
184+
Support for exception objects was added.
183185

184186
.. function:: pm()
185187

0 commit comments

Comments
 (0)