]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-128409: Document that pdb.post_mortem() accepts exceptions (#128410)
authorAdam Johnson <me@adamj.eu>
Fri, 10 Jan 2025 15:54:45 +0000 (15:54 +0000)
committerGitHub <noreply@github.com>
Fri, 10 Jan 2025 15:54:45 +0000 (10:54 -0500)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Doc/library/pdb.rst

index 6c099b22b38c219102ea6b08539073014d711a81..f9d1213fb6d29d2a79982811cc10ab0e15db35ac 100644 (file)
@@ -179,13 +179,15 @@ slightly different way:
    .. versionadded:: 3.14
       The *commands* argument.
 
-.. 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()