10000 gh-119856: Support exiting help() with just "exit" (#119858) · python/cpython@4223f1d · GitHub
[go: up one dir, main page]

Skip to content

Commit 4223f1d

Browse files
authored
gh-119856: Support exiting help() with just "exit" (#119858)
1 parent 1e5f615 commit 4223f1d

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
@@ -2007,7 +2007,7 @@ def interact(self):
20072007
if (len(request) > 2 and request[0] == request[-1] in ("'", '"')
20082008
and request[0] not in request[1:-1]):
20092009
request = request[1:-1]
2010-
if request.lower() in ('q', 'quit'): break
2010+
if request.lower() in ('q', 'quit', 'exit'): break
20112011
if request == 'help':
20122012
self.intro()
20132013
else:
@@ -2059,7 +2059,7 @@ def intro(self):
20592059
enter "modules spam".
20602060
20612061
To quit this help utility and return to the interpreter,
2062-
enter "q" or "quit".
2062+
enter "q", "quit" or "exit".
20632063
'''.format('%d.%d' % sys.version_info[:2]))
20642064

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

0 commit comments

Comments
 (0)
0