]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-128409: Document that pdb.post_mortem() accepts exceptions … (#128767)
authorTian Gao <gaogaotiantian@hotmail.com>
Mon, 13 Jan 2025 05:12:11 +0000 (00:12 -0500)
committerGitHub <noreply@github.com>
Mon, 13 Jan 2025 05:12:11 +0000 (00:12 -0500)
* [3.13] gh-128409: Document that pdb.post_mortem() accepts exceptions (GH-128410)
(cherry picked from commit 1b39b502d33c68f52fd775c4e6c2174baddd40bd)

Co-authored-by: Adam Johnson <me@adamj.eu>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Doc/library/pdb.rst

index 9478d7b7d5577d60e6226e2b4fc3963797f50174..50cafc1e2d823de912d4351a2cc412701eeac579 100644 (file)
@@ -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 <traceback-objects>`. 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()