"Eric Abrahamsen" <[EMAIL PROTECTED]> wrote

>> Welcome to the wacky world of recursion.
>> You call __upp from inside __upp so you do indeed generate
>> a new layer, in fact you start a new while loop. You need to
>
> So all those "yes"s were actually backing out of multiple while
> loops... Should have guessed that calling a method from inside 
> itself
> was a bad idea.

Actually recursion is a very powerful construction and not at
all a bad idea, but it needs to be carefully controlled - as you
discovered - but I have a topic on it in my tutorial (in the
'advanced' section)  if you want to see some of the
things it can be used for.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to