From af9ee3f7bc4dc9a410faefc70bcd2df9f7de51aa Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 12 May 2023 12:18:12 -0400 Subject: [PATCH 1/2] add a mention of PYTHONBREAKPOINT to breakpoint() docs --- Doc/library/functions.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 48a832db60e919..8f020f3ac7992d 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -168,6 +168,11 @@ are always available. They are listed here in alphabetical order. If :func:`sys.breakpointhook` is not accessible, this function will raise :exc:`RuntimeError`. + By default (if :func:`sys.breakpointhook` has not been replaced), the + behavior of :func:`breakpoint` can be changed with the + :envvar:`PYTHONBREAKPOINT` environment variable. See + :func:`sys.breakpointhook` for details. + .. audit-event:: builtins.breakpoint breakpointhook breakpoint .. versionadded:: 3.7 From 6b296d00e103cdbf6280e31507eadfa75d75180e Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 12 May 2023 11:33:51 -0700 Subject: [PATCH 2/2] Update Doc/library/functions.rst Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Doc/library/functions.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 8f020f3ac7992d..3d2bb8efc95d8e 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -168,10 +168,12 @@ are always available. They are listed here in alphabetical order. If :func:`sys.breakpointhook` is not accessible, this function will raise :exc:`RuntimeError`. - By default (if :func:`sys.breakpointhook` has not been replaced), the - behavior of :func:`breakpoint` can be changed with the - :envvar:`PYTHONBREAKPOINT` environment variable. See - :func:`sys.breakpointhook` for details. + By default, the behavior of :func:`breakpoint` can be changed with + the :envvar:`PYTHONBREAKPOINT` environment variable. + See :func:`sys.breakpointhook` for usage details. + + Note that this is not guaranteed if :func:`sys.breakpointhook` + has been replaced. .. audit-event:: builtins.breakpoint breakpointhook breakpoint