[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 09:43:51 EDT 2021


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

For reference, IPython has an entire interception + filtering mechanism to auto call certain functions:

https://github.com/ipython/ipython/blob/0e4d6390b2174fb1b352a082b72ad387ae696e87/IPython/core/prefilter.py#L414-L425

where exit is one instance of this:

https://github.com/ipython/ipython/blob/81b87f20aa8836b42fbb2b1dee7b662d8d5d46c6/IPython/core/autocall.py#L51-L57

As you can see, this requires an entirely different execution abstraction and a new layer in the middle that filters/intercepts the user input **after** it has been transformed into some intermediate representation.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44603>
_______________________________________


More information about the Python-bugs-list mailing list