Working around a lack of 'goto' in python
dmq at gain.com
Wed Mar 10 00:26:22 CET 2004
On Sat, 06 Mar 2004 18:18:28 GMT, "Brett" <abc at def.net> wrote:
>Two areas where I've found 'goto' two be useful in other languages are in
I agree there are situations where GOTO is appropriate, but the real
question is - Do we want it in Python, given that *most*, even
moderately skilled users, will abuse this tempting statement, and the
effort in dealing with the consequences of this abuse will far exceed
the effort of working around the few cases where it would be nice.
Python, more than C++, is intended to be the *best* language for users
who are not full-time programmers.
I once had a boss who wrote a 70-page program in BASIC. After a few
weeks, he gave up and expected me to fix it. After seeing that the
whole thing was one module, laced with GOTO's, I told him that I could
re-write the whole thing in less time than it would take to debug his
program. He did not want to hear that. He also thought it would take
too much time to explain to me what the program was supposed to do!
More information about the Python-list