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
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