A goto-like usage of a function
tim.golden at viacom-outdoor.co.uk
Thu Jul 29 17:58:53 CEST 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.
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:
More information about the Python-list