Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

IPython and other reprs are an entire abstraction layer on top of Python, which 
allows them to do a lot of extra things like implement new commands and alters 
a lot of behaviours, but the CPython REPL is just the interpreter evaluating 
commands, and this is very coupled with the regular machinery, at to the point 
that is the tokenizer the one consuming input (lazily!) from standard input.

Unless I am missing anything, the only way to do the desired behaviour is to 
re-architect part of how interactive mode works or to directly make exit a 
keyword, which is backwards incompatible. 

I may be missing simpler ways of course, but in general, my opinion is that 
anything that involves modifying the compiler pipeline to somehow special case 
this is too much cost for the advantage.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue44603>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to