[Python-Dev] a quit that actually quits

Aahz aahz at pythoncraft.com
Thu Dec 29 06:10:08 CET 2005


On Wed, Dec 28, 2005, Brett Cannon wrote:
> On 12/28/05, Aahz <aahz at pythoncraft.com> wrote:
>>
>> Here's yet a different take on this: why not simply change the startup
>> message?  Whether we choose "quit" or "exit", someone will get it wrong
>> unless there's an alias.  Changing the message is free.  Currently we
>> have
>>
>>     Type "help", "copyright", "credits" or "license" for more information.
>>
>> Let's add another line that says
>>
>>     Type "quit()" to exit
>>
>> Defining it as "def quit(): raise SystemExit" should be fine.
> 
> Just because people don't read unless it it thrown in their face.  =) 
> But that is still nice and simple and won't hurt.  I would still
> suggest using a class so that the repr can give a useful message,
> though.

That's fine.  I think the primary use case for this is someone who
accidentally stumbles into the Python interpreter, in which case that
message will be a life-saver.  Anybody who is formally attempting to use
the interpreter probably has ready access to docs that explain how to
use it.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Given that C++ has pointers and typecasts, it's really hard to have a serious 
conversation about type safety with a C++ programmer and keep a straight face.
It's kind of like having a guy who juggles chainsaws wearing body armor 
arguing with a guy who juggles rubber chickens wearing a T-shirt about who's 
in more danger."  --Roy Smith


More information about the Python-Dev mailing list