You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support typing "exit" or "quit" means exit from REPL. #19021
exit and quit could be variable names so we have .exit. we could do what python does and show a warning when those keywords are asked for without being assigned
we could do what python does and show a warning when those keywords are asked for without being assigned
that's better, or you could forbid people to define global variable named "quit" or "exit" only in REPL just like what ipython already did and that is considered user friendly.
I'd assume the chances of someone typing quit or exit by themselves into the repl, when they're not defined, and not wanting to quit the repl should be vanishingly rare.
changed the title [-]Everyone in the world knows that typing "exit" or "quit" means exit from REPL.[/-][+]Support typing "exit" or "quit" means exit from REPL.[/+]on Mar 13, 2018
Activity
devsnek commentedon Feb 27, 2018
exitandquitcould be variable names so we have.exit. we could do what python does and show a warning when those keywords are asked for without being assignedYanhao commentedon Feb 27, 2018
that's better, or you could forbid people to define global variable named "quit" or "exit" only in REPL just like what ipython already did and that is considered user friendly.
gibfahn commentedon Mar 5, 2018
Agreed that this isn't a great user experience.
I'd assume the chances of someone typing
quitorexitby themselves into the repl, when they're not defined, and not wanting to quit the repl should be vanishingly rare.[-]Everyone in the world knows that typing "exit" or "quit" means exit from REPL.[/-][+]Support typing "exit" or "quit" means exit from REPL.[/+]MylesBorins commentedon Mar 13, 2018
I've modified the title to be a little bit more friendly.
codeblooded commentedon Apr 13, 2018
Would you all be opposed to prompting for clarification? The repl makes you type
CMD-Ctwice to exit.You could do something like:
It could default to YES, so, if they simply press return, they’ll exit. If they say NO, it will proceed to run as if exit is a reference.
Benefits:
repl: add friendly tips about how to exit repl
repl: add friendly tips about how to exit repl
repl: add friendly tips about how to exit repl