Skip to content

Commit

Permalink
pythongh-119856: Support exiting help() with just "exit" (python#119858)
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner authored and mliezun committed Jun 3, 2024
1 parent 7dff737 commit 2b795f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/pydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 2b795f2

Please sign in to comment.