A goto-like usage of a function
Tim Golden
tim.golden at viacom-outdoor.co.uk
Thu Jul 29 11:58:53 EDT 2004
| I understand recursion to be a loop or a loop to
| be recursion... however you prefer to look at it.
| Whether it's a function calling itself until the
| user gets the input right or a while statement w/i
| a function waiting for correct input... IMO, it's
| the same thing. With that said, there may be
| performance issues that I'm unaware of that make
| your approach better or worse than mine...
| outside that, I think either approach is worthwhile.
Fair enough. I wasn't sure if you were a novice
who'd seen the recursion as the only way of looping,
or someone who simply chose to recurse. You're free
to choose. I suppose it's just my background which
makes me lean to iteration rather than recursion.
I too am unsure about the performance implications.
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-list
mailing list