BJörn Lindqvist wrote:
> do {
>     cmd = readline()
>     do_stuff_with_cmd(cmd);
> } while (!strcmp(cmd, "quit"));
> printf("Bye!");
> exit(0);
> 
> KISS?

I believe there were concerns that rebinding quit would cause strange 
behavior.  E.g.:

   >>> quit = False
   >>> while not quit: ...
   >>> quit
   $

Or:

   >>> if raw_input('quit?') == 'yes':
   ...     quit

will that work?  Should it?  Functions are pretty predictable in 
comparison to these other options.  So, at least to me, quit() == KISS


-- 
Ian Bicking  /  [EMAIL PROTECTED]  /  http://blog.ianbicking.org
_______________________________________________
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