https://github.com/python/cpython/commit/4223f1d828d3a3e1c8d803e3fdd420afd7d85faf
commit: 4223f1d828d3a3e1c8d803e3fdd420afd7d85faf
branch: main
author: Victor Stinner <vstin...@python.org>
committer: vstinner <vstin...@python.org>
date: 2024-06-03T10:15:04+02:00
summary:

gh-119856: Support exiting help() with just "exit" (#119858)

files:
M Lib/pydoc.py

diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 5d854c50f40d6e..2ba597d01f245e 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -2007,7 +2007,7 @@ def interact(self):
             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:
@@ -2059,7 +2059,7 @@ def intro(self):
 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):

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to