From c51c71a82830ec5fbabcf26d08cb12ceef69c78a Mon Sep 17 00:00:00 2001 From: Antraxmin Date: Fri, 15 Aug 2025 14:41:46 +0900 Subject: [PATCH 1/3] gh-137760: Update REPL constants documentation Update documentation for help, quit, and exit constants to reflect that they can be accessed directly in the interactive interpreter without parentheses, in addition to the traditional function call syntax. --- Doc/library/constants.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst index c0ac4ea8412ebd..c33a15468da2cb 100644 --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -97,15 +97,17 @@ should not be used in programs. exit(code=None) Objects that when printed, print a message like "Use quit() or Ctrl-D - (i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the + (i.e. EOF) to exit", and when accessed directly in the interactive + interpreter or called as functions, raise :exc:`SystemExit` with the specified exit code. .. data:: help :noindex: Object that when printed, prints the message "Type help() for interactive - help, or help(object) for help about object.", and when called, - acts as described :func:`elsewhere `. + help, or help(object) for help about object.", and when accessed directly + in the interactive interpreter, invokes the built-in help system + (see :func:`help`). .. data:: copyright credits From 19688d6a084287657c57c81fe0ff7389e8dba330 Mon Sep 17 00:00:00 2001 From: Chaemin-Lim Date: Fri, 15 Aug 2025 16:09:03 +0900 Subject: [PATCH 2/3] Update Doc/library/constants.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/library/constants.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst index c33a15468da2cb..1f92121429bece 100644 --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -97,7 +97,7 @@ should not be used in programs. exit(code=None) Objects that when printed, print a message like "Use quit() or Ctrl-D - (i.e. EOF) to exit", and when accessed directly in the interactive + (i.e. EOF) to exit", and when accessed directly in the interactive interpreter or called as functions, raise :exc:`SystemExit` with the specified exit code. From 38bfa2910eae1cc5e50e13655880bcc9f84c258b Mon Sep 17 00:00:00 2001 From: Chaemin-Lim Date: Fri, 15 Aug 2025 16:09:12 +0900 Subject: [PATCH 3/3] Update Doc/library/constants.rst Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/library/constants.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/constants.rst b/Doc/library/constants.rst index 1f92121429bece..04080fd0d865ec 100644 --- a/Doc/library/constants.rst +++ b/Doc/library/constants.rst @@ -106,7 +106,7 @@ should not be used in programs. Object that when printed, prints the message "Type help() for interactive help, or help(object) for help about object.", and when accessed directly - in the interactive interpreter, invokes the built-in help system + in the interactive interpreter, invokes the built-in help system (see :func:`help`). .. data:: copyright