From 0cd612fc05ec713d3307d76c456992457acb8bde Mon Sep 17 00:00:00 2001 From: Shubham Kumar Jha Date: Sun, 9 Aug 2020 20:18:22 +0530 Subject: [PATCH] bpo-41510: Updated documentation to add header kw-argument of pdb.set_trace --- Doc/library/functions.rst | 6 +++--- Doc/library/sys.rst | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 43c47c1da9434c..caf7e1cacba868 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -134,9 +134,9 @@ are always available. They are listed here in alphabetical order. This function drops you into the debugger at the call site. Specifically, it calls :func:`sys.breakpointhook`, passing ``args`` and ``kws`` straight through. By default, ``sys.breakpointhook()`` calls - :func:`pdb.set_trace()` expecting no arguments. In this case, it is - purely a convenience function so you don't have to explicitly import - :mod:`pdb` or type as much code to enter the debugger. However, + :func:`pdb.set_trace()` expecting an optional keyword argument `header`. In + this case, it is purely a convenience function so you don't have to explicitly + import :mod:`pdb` or type as much code to enter the debugger. However, :func:`sys.breakpointhook` can be set to some other function and :func:`breakpoint` will automatically call that, allowing you to drop into the debugger of choice. diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index d201d7061f9801..ee2e9634d3a47d 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -189,10 +189,10 @@ always available. function so that you can choose which debugger gets used. The signature of this function is dependent on what it calls. For example, - the default binding (e.g. ``pdb.set_trace()``) expects no arguments, but - you might bind it to a function that expects additional arguments - (positional and/or keyword). The built-in ``breakpoint()`` function passes - its ``*args`` and ``**kws`` straight through. Whatever + the default binding (e.g. ``pdb.set_trace()``) expects only an optional keyword + argument `header`, but you might bind it to a function that expects additional + arguments (positional and/or keyword). The built-in ``breakpoint()`` function + passes its ``*args`` and ``**kws`` straight through. Whatever ``breakpointhooks()`` returns is returned from ``breakpoint()``. The default implementation first consults the environment variable