8000 [3.13] gh-119856: Support exiting help() with just "exit" (GH-119858)… · python/cpython@c3fc3a2 · GitHub
[go: up one dir, main page]

Skip to content

Commit c3fc3a2

Browse files
[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 4223f1d) Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent e5dfcea commit c3fc3a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/pydoc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ def interact(self):
20082008
if (len(request) > 2 and request[0] == request[-1] in ("'", '"')
20092009
and request[0] not in request[1:-1]):
20102010
request = request[1:-1]
2011-
if request.lower() in ('q', 'quit'): break
2011+
if request.lower() in ('q', 'quit', 'exit'): break
20122012
if request == 'help':
20132013
self.intro()
20142014
else:
@@ -2060,7 +2060,7 @@ def intro(self):
20602060
enter "modules spam".
20612061
20622062
To quit this help utility and return to the interpreter,
2063-
enter "q" or "quit".
2063+
enter "q", "quit" or "exit".
20642064
'''.format('%d.%d' % sys.version_info[:2]))
20652065

20662066
def list(self, items, columns=4, width=80):

0 commit comments

Comments
 (0)
0