It sounds to me like what is being proposed amounts to essentially
"promote sys.exit to a builtin".  So why not do that?

I see two options.  Either:

    (a) Simply let __builtins__.exit = sys.exit.  Then we get:

        >>> exit
        <built-in function exit>

        which may be enough of a clue that you type "exit()" to exit.

    (b) If more handholding seems like a good idea, then:

        class ExitHatch:
            def __call__(self): sys.exit()
            def __repr__(self): return '<Type "exit()" to exit Python.>'
        __builtins__.exit = __builtins__.quit = ExitHatch()


-- ?!ng
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to