[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()
Pablo Galindo Salgado
report at bugs.python.org
Mon Jul 12 10:19:58 EDT 2021
Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:
One thing we *could* do which is not super invasive, is to match a single AST node of type NAME at the end of Python run. This seems to work but is a bit inelegant:
>>> print(exit)
Use exit() or Ctrl-D (i.e. EOF) to exit
>>> [exit]
[Use exit() or Ctrl-D (i.e. EOF) to exit]
>>> exit
bye!
I have opened a draft with this in PR27096
----------
stage: patch review ->
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44603>
_______________________________________
More information about the Python-bugs-list
mailing list