[Python-Dev] a quit that actually quits (original) (raw)
Neil Schemenauer nas at arctrix.com
Fri Dec 30 02:38:57 CET 2005
- Previous message: [Python-Dev] a quit that actually quits
- Next message: [Python-Dev] a quit that actually quits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: [Python-Dev] a quit that actually quits
- Next message: [Python-Dev] a quit that actually quits
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]