diff --git a/Doc/library/pdb.rst b/Doc/library/pdb.rst index 6a401a1af7eba38..98eebf6466c0332 100644 --- a/Doc/library/pdb.rst +++ b/Doc/library/pdb.rst @@ -806,6 +806,9 @@ can be overridden by the local file. .. pdbcommand:: retval Print the return value for the last return of the current function. + This command must be used immediately after the return line is executed; + the *return* command can be used to jump to the location where *retval* + can be used. .. pdbcommand:: exceptions [excnumber] diff --git a/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst b/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst new file mode 100644 index 000000000000000..8fd6ee6ba1bf8b5 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-09-16-22-38-58.bpo-20853.J3kJay.rst @@ -0,0 +1,2 @@ +In :mod:`pdb`, *args* and *retval* commands were fixed to properly handle +objects for which :func:`repr` raises an exception.