summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-03 09:10:39 (GMT)
committerGitHub <noreply@github.com>2024-06-03 09:10:39 (GMT)
commitc3fc3a2db84886f13bf020d7a1ec7f6b9ef1b775 (patch)
treea94cb8b628bccbf42eb1cd75fdb66038039e1f03 /Lib
parente5dfcea3e32f02cc740d7cb96f36f8327f3650bd (diff)
downloadcpython-c3fc3a2db84886f13bf020d7a1ec7f6b9ef1b775.zip
cpython-c3fc3a2db84886f13bf020d7a1ec7f6b9ef1b775.tar.gz
cpython-c3fc3a2db84886f13bf020d7a1ec7f6b9ef1b775.tar.bz2
[3.13] gh-119856: Support exiting help() with just "exit" (GH-119858) (#119967)
gh-119856: Support exiting help() with just "exit" (GH-119858) (cherry picked from commit 4223f1d828d3a3e1c8d803e3fdd420afd7d85faf) Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 55ccf21..922e7fb 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -2008,7 +2008,7 @@ has the same effect as typing a particular string at the help> prompt.
if (len(request) > 2 and request[0] == request[-1] in ("'", '"')
and request[0] not in request[1:-1]):
request = request[1:-1]
- if request.lower() in ('q', 'quit'): break
+ if request.lower() in ('q', 'quit', 'exit'): break
if request == 'help':
self.intro()
else:
@@ -2060,7 +2060,7 @@ the modules whose name or summary contain a given string such as "spam",
enter "modules spam".
To quit this help utility and return to the interpreter,
-enter "q" or "quit".
+enter "q", "quit" or "exit".
'''.format('%d.%d' % sys.version_info[:2]))
def list(self, items, columns=4, width=80):