A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-March/062163.html below:

[Python-Dev] quit() on the prompt

[Python-Dev] quit() on the prompt [Python-Dev] quit() on the promptIan Bicking ianb at colorstudy.com
Wed Mar 8 00:31:01 CET 2006
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  /  ianb at colorstudy.com  /  http://blog.ianbicking.org
More information about the Python-Dev mailing list

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