Whatever logic currently used to print the 'Use quit() or Ctrl-Z plus Return to exit' message could also... quit the REPL in the first place, right?
I don't program Python much but do its users constantly type "quit" but not actually want to quit such that the REPL special cases this situation?