Scott David Daniels <Scott.Daniels at Acm.Org> wrote: > Or, perhaps: > class _Quitter(str): > def __call__(self): raise SystemExit > quit = _Quitter('The quit command. Type "quit()" to exit') > exit = _Quitter('The exit command. Type "exit()" to exit') FWIW, I like this kind of solution best. Something magical would be a mistake. I don't like the status quo because there is no cross-plaform way to indicate EOF (or more pedantically "push current line"). Maybe we can make everyone happy by making the 'quit' and 'exit' objects callable and changing the message to something like: Use quit() or Ctrl-D (i.e. EOF) to exit. Cheers, Neil
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4