char** to {'':('',)}

Bengt Richter bokr at accessone.com
Sat Sep 1 16:16:45 EDT 2001


On 31 Aug 2001 12:00:12 -0700, Grant Griffin <not.this at seebelow.org> wrote:

>In article <mailman.999278389.32583.python-list at python.org>, "Tim says...
>>
>>... If you suffer KFG (Kneejerk Fear of Goto)...
>
>Naw, I don't.  In fact, in assembly, I use 'em all the time <wink>.
>
>But I live in a world that mostly _does_ suffer from KFG, so not using them can
>save a lot of explaining (except here <wink>.)  And more importantly, on a
>purely pragmatic basis, nearly every time I've put them in, I've ended up taking
>them out.
>
To pacify the no-goto folks, you can always do something like
...
for(whereToGo=FIRST_PLACE; whereToGo!=EXIT_LOOP_PLACE;){
    switch(whereTogo){
    case FIRST_PLACE:
        /* do something and decide what's next */
        whereToGo = ANYPLACE_NEXT_YOU_LIKE;
	continue;
    case ...
    }
    ...
}

Structured spaghetti ;-)




More information about the Python-list mailing list