Skip to content

Commit c51c71a

Browse files
committed
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.
1 parent 8665769 commit c51c71a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Doc/library/constants.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,17 @@ should not be used in programs.
9797
exit(code=None)
9898

9999
Objects that when printed, print a message like "Use quit() or Ctrl-D
100-
(i.e. EOF) to exit", and when called, raise :exc:`SystemExit` with the
100+
(i.e. EOF) to exit", and when accessed directly in the interactive
101+
interpreter or called as functions, raise :exc:`SystemExit` with the
101102
specified exit code.
102103

103104
.. data:: help
104105
:noindex:
105106

106107
Object that when printed, prints the message "Type help() for interactive
107-
help, or help(object) for help about object.", and when called,
108-
acts as described :func:`elsewhere <help>`.
108+
help, or help(object) for help about object.", and when accessed directly
109+
in the interactive interpreter, invokes the built-in help system
110+
(see :func:`help`).
109111

110112
.. data:: copyright
111113
credits

0 commit comments

Comments
 (0)